10-25-2007 3:02 AM
Hi all,
How to check the last word of the sentence to have a '.'
example
hello world -
> hello world.
anycode
thks
10-25-2007 3:07 AM
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
10-25-2007 3:07 AM
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