preloader-matrix

Alfasith

String Handling in AX

Hi,

    str 100     mailBody = ‘Mohamed Alfasith IsmailSuban’;
    if(strScan(mailBody,’Suban’,1,strLen(mailBody)))
// 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

Regards

Leave a Reply

Your email address will not be published. Required fields are marked *