example:
        {% strip '<br>' %}
            content...
            content...
        {% endstrip %}
    result:
        content...<br>content...
    arg special symbols: {\n} = \n
506380
def strip(parser, arg):
    
    nodelist = parser.parse(('endstrip',))
    parser.delete_first_token()
    return StripNode(nodelist, arg.split_contents())
490524
def dashrepl(value):
    
    patt = re.compile(r'\W', re.UNICODE)
    return re.sub(patt, '-', value)
170055
function trimUrlValue(value) {
    var beginSlice, endSlice;
    value = value.trim();
    beginSlice = value.charAt(0) === '\'' || value.charAt(0) === '"' ? 1 : 0;
    endSlice = value.charAt(value.length - 1) === '\'' ||
        value.charAt(value.length - 1) === '"' ?
        -1 : undefined;
    return value.slice(beginSlice, endSlice).trim();
}
1195746
def pre(*content, sep='\n'):
    
    return _md(_join(*content, sep=sep), symbols=MD_SYMBOLS[3])
820926
function stripLinkDefinitions(text) {

        var text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm, function (wholeMatch,m1,m2,m3,m4) {
            m1 = m1.toLowerCase();
            urls[m1] = encodeAmpsAndAngles(m2);
            if (m3) {
                return m3+m4;
            } else if (m4) {
                titles[m1] = m4.replace(/"/g,"&quot;");
            }
            return "";
        });

        return text;
    }
1055166
def strip_prefixes(g: Graph):
        
        return re.sub(r'^@prefix .* .\n', '',
                      g.serialize(format="turtle").decode(),
                      flags=re.MULTILINE).strip()
1267190
def strip_required_suffix(string, suffix):
    
    if string.endswith(suffix):
        return string[:-len(suffix)]
    raise AssertionError('String ends with %r, not %r' % (string[-len(suffix):], suffix))
65916
def _stripslashes(s):
  ''''''
  r = re.sub(r"\\(n|r)", "\n", s)
  r = re.sub(r"\\", "", r)
  return r
368098
def opt_strip(prefix, opts):
    

    ret = {}
    for opt_name, opt_value in opts.items():
        # remove prefix
        if opt_name.startswith(prefix):
            opt_name = opt_name[len(prefix):]

        ret[opt_name] = opt_value

    return ret
353286
def endswith(self, suffix, ignore_case=False, options=None):
        
        return self.regex(re.escape(suffix) + '$', ignore_case=ignore_case, options=options)
1051595
private String stripLineBreaks(String text, String replacement)
   {
      if (text.indexOf('\r') != -1 || text.indexOf('\n') != -1)
      {
         StringBuilder sb = new StringBuilder(text);

         int index;

         while ((index = sb.indexOf("\r\n")) != -1)
         {
            sb.replace(index, index + 2, replacement);
         }

         while ((index = sb.indexOf("\n\r")) != -1)
         {
            sb.replace(index, index + 2, replacement);
         }

         while ((index = sb.indexOf("\r")) != -1)
         {
            sb.replace(index, index + 1, replacement);
         }

         while ((index = sb.indexOf("\n")) != -1)
         {
            sb.replace(index, index + 1, replacement);
         }

         text = sb.toString();
      }

      return (text);
   }
914173
def encode(*args):
    ""
    result = []
    result.append("*")
    result.append(str(len(args)))
    result.append(DELIMITER)
    for arg in args:
        result.append("$")
        result.append(str(len(arg)))
        result.append(DELIMITER)
        result.append(arg)
        result.append(DELIMITER)
    return "".join(result)
1318806
def format_and_strip(template, params, strip_string=strip_string):
    
    chunks = template.split(u"%s")
    if not chunks:
        raise ValueError("No formatting placeholders found")

    params = list(reversed(params))
    rv_remarks = []
    rv_original_length = 0
    rv_length = 0
    rv = []

    def realign_remark(remark):
        return [
            (rv_length + x if isinstance(x, int_types) and i < 4 else x)
            for i, x in enumerate(remark)
        ]

    for chunk in chunks[:-1]:
        rv.append(chunk)
        rv_length += len(chunk)
        rv_original_length += len(chunk)
        if not params:
            raise ValueError("Not enough params.")
        param = params.pop()

        stripped_param = strip_string(param)
        if isinstance(stripped_param, AnnotatedValue):
            rv_remarks.extend(
                realign_remark(remark) for remark in stripped_param.metadata["rem"]
            )
            stripped_param = stripped_param.value

        rv_original_length += len(param)
        rv_length += len(stripped_param)
        rv.append(stripped_param)

    rv.append(chunks[-1])
    rv_length += len(chunks[-1])
    rv_original_length += len(chunks[-1])

    rv = u"".join(rv)
    assert len(rv) == rv_length

    if not rv_remarks:
        return rv

    return AnnotatedValue(
        value=rv, metadata={"len": rv_original_length, "rem": rv_remarks}
    )
67045
def tmpl_replchars(text, replace, chars):
        
        for char in chars:
            text = text.replace(char, replace)
        return text
1128824
function stripLoaderPrefix(str) {
	if (typeof str === 'string') {
		str = str.replace(
			/(?:(\()|(^|\b|@))(\.\/~|\.{0,2}\/(?:[^\s]+\/)?node_modules)\/\w+-loader(\/[^?!]+)?(\?\?[\w_.-]+|\?({[\s\S]*?})?)?!/g,
			'$1'
		);
		str = str.replace(/(\.?\.?(?:\/[^/ ]+)+)\s+\(\1\)/g, '$1');
		str = replaceAll(str, process.cwd(), '.');
		return str;
	}
	return str;
}
366434
function replaceFn(name, args, content) {
    var newContent = '';
    var oneVarRE = /(\$\w+)/g;
    var variableRE = /(\$\w+)([\+\-\*/@])/g;
    var content = removeSpace(content);
    // to get '$a' in the end of a content string beacuse of my bad Reg
    content = content + '@';
    var length = args.length;

    if (length) {
        if(length === 1) {
            content = content.replace(oneVarRE, args[0]);
        } else {
            var i = 0;
            var replacer = function(str, $1, $2) {
                if(args[i]){
                    return args[i++] + $2;
                } else {
                    return str;
                }

            }
            content = content.replace(variableRE, replacer);
        }

    } else {
        // no params
        content = content;
    }
    // delete '@'
    newContent = content.substr(0, content.length - 1);



    return newContent;
}
1294132
function stripBraces(state, str) {
  if (!str.match(TEMPLATE_REGION)) {
    handleError(state, 'Expected ' + str + ' to match ${...}');
    return str;
  }
  return str.slice(2, -1);
}