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

syntax check

Former Member
0 Likes
336

Hi all,

How to check the last word of the sentence to have a '.'

example

hello world -


> hello world.

anycode

thks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
309

data: w_str type string value 'hello world',

w_len type i.

w_len = strlen( w_str ).

w_len = w_len - 1.

if w_str+w_len(1) eq '.'.

write: / 'String ends with a period'.

else.

write: / 'String doesn't end with a period'.

endif.

Arya

1 REPLY 1
Read only

Former Member
0 Likes
310

data: w_str type string value 'hello world',

w_len type i.

w_len = strlen( w_str ).

w_len = w_len - 1.

if w_str+w_len(1) eq '.'.

write: / 'String ends with a period'.

else.

write: / 'String doesn't end with a period'.

endif.

Arya