Application Development and Automation 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: 
Read only

string operation

Former Member
0 Likes
634

hi folks,

i have a string '45asdfasdfasdf'

how i can remove first ' and last '.

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
613

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
Read only

Former Member
0 Likes
613

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

Read only

Former Member
0 Likes
614

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.

Read only

Former Member
0 Likes
613

data : a type string value '45asdfasdfasdf'.

translate a using ''' '.

condense a no-gaps.

write 😕 a.

Regards

Vasu

Read only

Former Member
0 Likes
613

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....