Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnFilterScriptInit(){
- printf("Caracteres: %i", CountCharInString("Hello, This is, a, string", ','));
- return true;
- }
- CountCharInString(string[], chara){
- static
- String_Char,
- String_Size
- ;
- String_Char = 0;
- String_Size = strlen(string);
- for( ; String_Size > -1; --String_Size){
- if(string[String_Size] == chara){
- String_Char ++;
- }
- }
- return String_Char;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement