‎2007 Sep 14 10:58 AM
Hi all,
I would like to add a '%' to a string always at position 5 in the string e.g.
XXXX1234567
becomes XXXX%1234567
Is this possible?
‎2007 Sep 14 11:01 AM
Hi,
It is possible.
String = XXXX1234567.
str1 = String+0(4).
str2 = String+4(7).
Concatenate str1 '%' str2 into string1.
string1 will have XXXX%1234567
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 14 11:57 AM
Hi Uma,
the times are over when coding was paid per line
what about
concatenate string(4) '%' string+4 into string.
In both cases a check strlen( string ) > 4 is mandatory.
Regards,
Clemens
‎2007 Sep 14 11:29 AM
Hello,
Just to add on to the above point....
if we have a case where the number of characters can vary..always use the "Strlen"
Character_field = XXXX1234567.
Data :length type i.
length = strlen(character_field)
" length will now contain the number of characters.
and based on this we can do the concatenate or move
Regards
Byju
‎2007 Sep 14 11:44 AM