X++ CODE TO REMOVE first or starting CHARACTERS.
use the below code to remove the last character of a string in ax .
strDel(noteDescription,1,1)
str strDel(
str _text,
int _position,
int _number)
Example:
using strDel function Note: removes 2 letters from 4th letter onwards
info(strDel("1Description",1,1));
Result : Description
Similarly the number of characters can be increased or descreased.
Below code will remove the last 3 characters from the string.
Str example = 'Example123';
info(strDel(example, strLen(example) -2, 3));
Output : 'Example'
Thanks,
Vikas Mehta.
use the below code to remove the last character of a string in ax .
strDel(noteDescription,1,1)
str strDel(
str _text,
int _position,
int _number)
Example:
using strDel function Note: removes 2 letters from 4th letter onwards
info(strDel("1Description",1,1));
Result : Description
Similarly the number of characters can be increased or descreased.
Below code will remove the last 3 characters from the string.
Str example = 'Example123';
info(strDel(example, strLen(example) -2, 3));
Output : 'Example'
Thanks,
Vikas Mehta.
No comments:
Post a Comment