2008 Jan 17 12:58 AM
Hi,
I need to delete the last 2 character from a string.
I am using strlen to identify its lenght. If someone can guide how its should be done.
after this two step I tired using
w_string2 = w_string + w_level_03.
w_string = it_cc-prctr.
w_level_03 = strlen( W_STRING ) - 2.
w_string2 = w_string + w_level_03.
the third step is adding the record not deleting the last character/ number from the string.
2008 Jan 17 1:06 AM
Replace the following as your Third step.
w_string2 = w_string(w_level_03).
You shud be fine.
Vinodh Balakrishnan
2008 Jan 17 3:11 AM
Hi,
The following code it to delete the last 2 chars:
str = "testing".
int offset = strlen( str ) - 2.
str = str+0(offset).
Try this if useful.
Thanks & Regards,
Kiran Chennapai
2008 Jan 17 3:17 AM
Hi try this..
w_level_03 = strlen( W_STRING ).
lv_offset = w_level_03 - 2.
w_string2 = w_string +(lv_offset).
or
w_string2 = w_string +0(lv_offset).