Number to String
This will convert a number variable to a string. This may be helpful with specific formatting or string concatenation. For more details check out this entry in PeopleBooks.
SubstringLocal number &Num = 2;Local string &NumAsString = NumberToString("%03",&Num);/* &NumAsString will now equal "002" */
This will take a substring of a larger string.
Local string &foo = "This is a foo string.";Local string &start_key = "Th";Local string &end_key = ".";Local integer &start_pos = Find(&start_key, &foo) + Len(&start_key);Local integer &end_pos = Find(&end_key, &foo);Local string &result = Substring(&foo, &start_pos, &end_pos - &start_pos);/* &result will now equal "is is a foo string" */
Kyle,
ReplyDeleteThank you.
I found this page to be VERY helpful and get me past the substring issue I was having.
How nice of you to share your knowledge.
yvonne
Another very useful function is DateTimeToLocalizedString().
ReplyDeleteThis can come in really handy when generating timestamps.
This can be used liked shown below:
DateTimeToLocalizedString(%Datetime, "ddMMyy-HHmmss");
Thanks Kyle , Tip was helpfull for me.
ReplyDeleteThanks
Prashant
Very helpful, Kyle. Thanks for posting :)
ReplyDelete