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