String Handling in AX


    str 100     mailBody = ‘Mohamed Alfasith IsmailSuban’;
// Checks the presence of the string
       print strreplace(mailBody,’Suban’,”Mohamed”);
//Replaces the substring in main string…
//Delete the first letter in AX
strDel(“Dynamic AX”,1,1); // it retuns “ynamic”

subStr(“Alfasith”,3,5); //Returns the string ‘fasit’.
strUpr(“Alfaith”); // Returns the string ALFASITH
strRTrim(“*AX*”); //Returns “*AX”. removes the space in right end
strLTrim(“*AX*”); //Returns ” AX*”. removes the space in left end

str mytxt = “MohamednAlfasithnIsmail”; // here n is the new line escape sequence
print strLine(mytxt,1); // this prints only Mohamed

strLen(“Fasith”); // returns 6

strRep(‘Ala’,5); //  returns AlaAlaAlaAlaAla


Share on email
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Leave a Reply

Your email address will not be published.