'_' replace with ' '
#5

Код:
strreplace2(string[], const find[], const replace[], bool:ignorecase=true, count=cellmax, maxlength=sizeof(string))
{
    if(isnull(find) || isnull(string)) return 0;
    new matches;
    for(new idx, flen = strlen(find), rlen = strlen(replace), pos = strfind(string, find, ignorecase); pos != -1 && idx < maxlength && matches < count; pos = strfind(string, find, ignorecase, idx)) {
        strdel(string, pos, pos + flen);
        if(rlen) strins(string, replace, pos, maxlength);
        idx = pos + rlen;
        matches++;
    }
    return matches;
}
Reply


Messages In This Thread
-- FIXED - by thaKing - 11.06.2014, 19:40
Re: '_' replace with ' ' - by Shockey HD - 11.06.2014, 20:01
Re: '_' replace with ' ' - by DobbysGamertag - 11.06.2014, 20:03
Re: '_' replace with ' ' - by TakeiT - 11.06.2014, 20:04
Re: '_' replace with ' ' - by Kyle - 11.06.2014, 20:05
Re: '_' replace with ' ' - by DobbysGamertag - 11.06.2014, 20:08
Re: '_' replace with ' ' - by thaKing - 11.06.2014, 20:19
Re: '_' replace with ' ' - by TakeiT - 12.06.2014, 14:02

Forum Jump:


Users browsing this thread: 1 Guest(s)