Notifications
Announcements
No record found.
Hi,
I had a small question.
Could any one solve me that how can i change string.
for example there is a string ABC-#### now i need to get output as 1111 in place of #'s.
*This post is locked for comments
Can you provide some more information as the string you provided seems to be some numbersequenceId.
Thanks,Chaitanya Golla
No it not a numbersequenceId it is just a small job i need to display the string ABC-#### as 1111 so i need to show output. In out i need not to show ABC-
You need to use strReplace function as below.
Refer link: msdn.microsoft.com/.../global.strreplace.aspx
static void AxC(Args _args)
{
str s;
s = strReplace("ABC-####", "#", "1");
info(strFmt("%1", s));
}
Thanks,
Chaitanya Golla
Hi Murali,
If you actually want to replace the # characters from the string with a single character you can do that as explained by Chaitanya above.
If you just want to get the string after the prefix (ABC-) you can use substr function. Something like this:
str newVal = subStr( yourString, 5, strlen(yourString));
str myInputStr = 'ABC-####'; str myOutputStr = strDel(myInputStr, 5, 4); info(myOutputStr);info(myOutputStr + '1111');
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Priya_K 4
Martin Dráb 4 Most Valuable Professional
Ali Zaidi 2