Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock str_del_free_space(string_[], _char = ' ') {
- new len = strlen(string_);
- if(len) {
- new begin = -1, end = len;
- while(string_[++begin] == _char){}
- if(string_[begin] == EOS) {
- string_[0] = 0;
- return 1;
- }
- while(string_[--end] == _char) {}
- strmid(string_, string_, begin, end+1, len+1);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement