Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

string operation

Former Member
0 Kudos

hi folks,

i have a string '45asdfasdfasdf'

how i can remove first ' and last '.

thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi virat,

1. simple

2. Just copy paste

REPORT Z_TEST1.

data : str(25) type c.

str = `'45asdfasdfasdf'`.

write 😕 str.

replace all occurrences of `'` in str with ''.

write 😕 str.

3. Note

replace all occurrences of `'` in str with ''.

has this character ` (Just left to the 1 on the keyboard = tilde key but with shift)

regards,

amit m.

4 REPLIES 4

Former Member
0 Kudos

data w_string(14) type c value '45asdfasdfasdf'.

data w_temp(13) type c.

data w_out(12) type c.

  • This removes the last character

move w_string to w_temp.

  • This removes the first character

move w_temp+1(12) to w_out.

Regards,

Pavan

Former Member
0 Kudos

Hi virat,

1. simple

2. Just copy paste

REPORT Z_TEST1.

data : str(25) type c.

str = `'45asdfasdfasdf'`.

write 😕 str.

replace all occurrences of `'` in str with ''.

write 😕 str.

3. Note

replace all occurrences of `'` in str with ''.

has this character ` (Just left to the 1 on the keyboard = tilde key but with shift)

regards,

amit m.

Former Member
0 Kudos

data : a type string value '45asdfasdfasdf'.

translate a using ''' '.

condense a no-gaps.

write 😕 a.

Regards

Vasu

Former Member
0 Kudos

if you want to remove first letter means

x = 45asdfasdfasdf

y = x+1( 13)

z = x+0(13)

now in y ve 5asdfasdfasdf

and z ve 45asdfasdfasd

likewise you can implement it....

thanks ,

reward points if helpful....