Usage of Text buffer class in AX

Hi,
Text buffer class is used to fetch the required text from a string.
Example:
Below code is useful to fetch the text avoiding the commas one by one.
static void Job33(Args _args)
{
TEXTBUFFER TB = NEW TEXTBUFFER();
str s = “2013-14,2012-13″, yr;
;

do
{
tb.setText(s);
tb.nextToken(0, ‘,’);
info(tb.token());
s = substr(tb.getText(), 2, 200);
}while (s != ”);
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s