Hi,
How can i find the Count of a character appeared in a string.
For example suppose i have a string ABCDEFG@Yahoo.com,XYZ123@Yahoo.co.uk then if i want to find the Number of '@'. how can i do this using string function.
Dear Mohana,
I used F1 but didn't found any function which count the occurrence of a character in a String. STRPOS gives the position of that character in a string and not the no of times that character appears in a string.
Dear Mohana,
I used F1 but didn't found any function which count the occurrence of a character in a String. STRPOS gives the position of that character in a string and not the no of times that character appears in a string.
Hi,
How can i find the Count of a character appeared in a string.
For example suppose i have a string ABCDEFG@Yahoo.com,XYZ123@Yahoo.co.uk then if i want to find the Number of '@'. how can i do this using string function.
Answers
Position := STRPOS(String, SubString)
PS:use F1 or search before posting
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I used F1 but didn't found any function which count the occurrence of a character in a String.
STRPOS gives the position of that character in a string and not the no of times that character appears in a string.
[-( [-(
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Hi
TextLine := 'yourtext';
STRLEN(DELCHR(TextLine, '<=>', DELCHR(TextLine,'<=>', '@')));
Bye
Matteo
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
This worked perfectly. Thanks