[HELP] Using str_ireplace to leach Special Charakters out of a string
#4

You can do like this:

Код:
stock removeChars(from[], char_array[])
{
  new 
    from_ptr[];

  for(new x = 0, o = 0, y = 0; from[x] != EOS; x++)
  {
    while(char_array[o++])
      if(from[x] == char_array[o])
       continue;
    from_ptr[y++] = from[x];
    o = 0;
  }
}
This should work, but not tested :P

edit: sry i didn't saw that you need to replace, not to remove; ignore this :P
Reply


Messages In This Thread
[HELP] Using str_ireplace to leach Special Charakters out of a string - by kony1994 - 23.10.2009, 10:12
Re: [HELP] Using str_ireplace to leach Special Charakters out of a string - by Westie - 23.10.2009, 11:06
Re: [HELP] Using str_ireplace to leach Special Charakters out of a string - by kony1994 - 23.10.2009, 11:51
Re: [HELP] Using str_ireplace to leach Special Charakters out of a string - by Google63 - 23.10.2009, 13:35

Forum Jump:


Users browsing this thread: 1 Guest(s)