How to use substring function in X++ ax 2009 ?
Sometimes you need to take part of the original string to check on some data
for example :
if you have items start with MED , FLU,HIV...etc
we need to apply sub string to this words to take only the first character
we will use this function to complete this task :
void test()
{
str Name;
str Result;
;
Name="MED";
Result=substr(name,1,1);
info(strfmt("The original Name : %1,the sub string Result : %2",Name,Result));
}
NOTE :
The info will show this result :
The original Name : MED the sub string Result : M
for example :
if you have items start with MED , FLU,HIV...etc
we need to apply sub string to this words to take only the first character
we will use this function to complete this task :
void test()
{
str Name;
str Result;
;
Name="MED";
Result=substr(name,1,1);
info(strfmt("The original Name : %1,the sub string Result : %2",Name,Result));
}
NOTE :
The info will show this result :
The original Name : MED the sub string Result : M
*This post is locked for comments