* synopsis: ``%delchars{text,chars}``
        * description: Delete every single character of “chars“ in “text”.
554572
def tmpl_delchars(text, chars):
        
        for char in chars:
            text = text.replace(char, '')
        return text
120057
function( text ){
			if(text && text.length){
				var i = text.length,
					x = 0;

				// turn all whitespace chars at end into spaces
				while (i--) {
					if(this.isOnlyWhiteSpace(text[i])){
						text = this.replaceCharAt( text, i, ' ' );
					}else{
						break;
					}
				}

				// turn all whitespace chars at start into spaces
				i = text.length;
				while (x < i) {
					if(this.isOnlyWhiteSpace(text[x])){
						text = this.replaceCharAt( text, i, ' ' );
					}else{
						break;
					}
					x++;
				}
			}
			return this.trim(text);
		}
1001136
def _clean_characters(x):
    
    if not isinstance(x, six.string_types):
        x = str(x)
    else:
        if not all(ord(char) < 128 for char in x):
            msg = "Found unicode character in input YAML (%s)" % (x)
            raise ValueError(repr(msg))
    for problem in [" ", ".", "/", "\\", "[", "]", "&", ";", "#", "+", ":", ")", "("]:
        x = x.replace(problem, "_")
    return x
288313
def command_clean(string, vargs):
    
    valid_chars, invalid_chars = remove_invalid_ipa_characters(
        unicode_string=string,
        return_invalid=True,
        single_char_parsing=vargs["single_char_parsing"]
    )
    print(u"".join(valid_chars))
    print_invalid_chars(invalid_chars, vargs)
848690
function cutString(srcStr, length) {
      var tmpChar, tmpStr = '', count = 0, i = -1;
      while (++i < srcStr.length) {
        if (count >= length) break;
        tmpChar = srcStr.substr(i, 1);
        tmpStr += tmpChar;
        count += matchPattern(tmpChar, 'dbChar') ? 2 : 1;
      }
      return tmpStr + '...';
    }
1234484
def backward_delete_char(self, e): # (Rubout)
        """
        self.l_buffer.backward_delete_char(self.argument_reset)
        self.finalize()
795696
private static void handleLiteralChar(final StringBuilder buffer, final int escapeCounter, final char curChar) {
        // any other char beside ESCAPE or DELIM_START/STOP-combo
        // write unescaped escape chars
        writeUnescapedEscapeChars(escapeCounter, buffer);
        buffer.append(curChar);
    }
302995
function _trimText(text, maxLength) {
  if(text) {
    text = text.toString();
    if(text.length > maxLength) {
      text = text.substr(0, maxLength - 1) + '..';
    }
  }
  return text;
}
738747
def text_cleanup(data, key, last_type):
    
    if key in data and last_type == STRING_TYPE:
        data[key] = data[key].strip()
    return data
994097
def deletetone(text: str) -> str:
    
    chars = [ch for ch in text if ch not in thai_tonemarks]
    return "".join(chars)
15579
function stripColon(text) {
    var i = text.indexOf(":");
    if (i >= 0) {
        text = text.substr(i).trim();
        if (text[1] == " ") {
            text = text.substr(1).trim();
        }
    }
    return text;
}
775517
def process(self, chars):
        

        while len(chars) > 0:
            self.consume(chars[0])
            chars = chars[1:]
202478
public final void getChars(int start, int end, char[] dest, int off) {
        mText.getChars(start, end, dest, off);
    }
1285603
function(text) {
        return text.replace(/"([^"]|"")*"/g, function(value) {
            return value.replace(LF, CUSTOM_LF_SUBCHAR)
                .replace(CR, CUSTOM_CR_SUBCHAR);
        });
    }
74025
public function removeChar(&$txt, &$cOTLdata, $char)
	{
		while (mb_strpos($txt, $char, 0, $this->mpdf->mb_enc) !== false) {
			$pos = mb_strpos($txt, $char, 0, $this->mpdf->mb_enc);
			$newGPOSinfo = [];
			$cOTLdata['group'] = substr_replace($cOTLdata['group'], '', $pos, 1);
			if ($cOTLdata['GPOSinfo']) {
				foreach ($cOTLdata['GPOSinfo'] as $k => $val) {
					if ($k > $pos) {
						$newGPOSinfo[($k - 1)] = $val;
					} elseif ($k != $pos) {
						$newGPOSinfo[$k] = $val;
					}
				}
				$cOTLdata['GPOSinfo'] = $newGPOSinfo;
			}
			if (isset($cOTLdata['char_data'])) {
				array_splice($cOTLdata['char_data'], $pos, 1);
			}

			$txt = preg_replace("/" . $char . "/", '', $txt, 1);
		}
	}
393443
public static boolean endsWithChar(String str, char ch) {
        if (StringUtils.isEmpty(str)) {
            return false;
        }

        return str.charAt(str.length() - 1) == ch;
    }
990148
function flush_char(outs) {
    if (a_count > 0) {
      outs.writeByte(a_count);
      outs.writeBytes(accum, 0, a_count);
      a_count = 0;
    }
  }