Strip agents from a string.
195811
def strip_accents(text):
    

    normalized_str = unicodedata.normalize('NFD', text)

    return ''.join([
        c for c in normalized_str if unicodedata.category(c) != 'Mn'])
1342550
def strip_files(args, parser):
    """"""
    stripper = tacl.Stripper(args.input, args.output)
    stripper.strip_files()
484254
def strip_exts(s, exts):
    
    f_split = os.path.splitext(s)
    if f_split[1] in exts:
        return f_split[0]
    else:
        return s
1001650
def _strip(text):
        """"""
        text = text.strip()
        text = text.replace('  ', ' ')  # remove duplicate spaces
        text = text.lower()
        for joiner in TextTitle.JOINERS:
            text = text.replace(joiner, 'and')
        for article in TextTitle.ARTICLES:
            if text.startswith(article + ' '):
                text = text[len(article) + 1:]
                break
        return text
978118
def cleanString(someText):
    
    ret = ''
    if someText is not None:
        ret = filter(unicode.isalnum, someText.lower())
    return ret
634979
def clean(some_string, uppercase=False):
    
    if uppercase:
        return some_string.strip().upper()
    else:
        return some_string.strip().lower()
173036
def cleanup_payload(self, payload):
        
        p = payload.replace('\n', '')
        p = p.rstrip()
        p = p.lstrip()
        return p
270983
def reduce_multiline(string):
    
    string = str(string)
    return " ".join([item.strip()
                     for item in string.split("\n")
                     if item.strip()])
334596
def _strip_text(text):
        """"""
        text = re.sub(r'[ ,?:]|%s', "", text.lower())
        for chr in "-%":
            new_text = text.replace(chr, "")
            if new_text:
                text = new_text
        return text.lower()
710829
def strippen(function):
    ""
    def wrapper(*args, **kwargs):
        return strip_strings(function(*args, **kwargs))
    return wrapper
724946
def strip_prompt(self, a_string):
        """"""
        expect_string = r"^(OK|ERROR|Command not recognized\.)$"
        response_list = a_string.split(self.RESPONSE_RETURN)
        last_line = response_list[-1]
        if re.search(expect_string, last_line):
            return self.RESPONSE_RETURN.join(response_list[:-1])
        else:
            return a_string
716276
private String stripPrefix(final String input, final String searchString) {
        return input.substring(searchString.length(), input.length()).trim();
    }
274378
def strip_prompt(self, a_string):
        
        output = super(NetscalerSSH, self).strip_prompt(a_string)
        lines = output.split(self.RESPONSE_RETURN)
        if "Done" in lines[-1]:
            return self.RESPONSE_RETURN.join(lines[:-1])
        else:
            return output
1199011
private static String strip(String in) {
        if (in == null) {
            return null;
        }
        String out = in.trim();
        if (out.length() == 0) {
            return null;
        } else {
            return out;
        }
    }
171962
def __StripName(self, name):
        """"""
        if not name:
            return name
        for prefix in self.__strip_prefixes:
            if name.startswith(prefix):
                return name[len(prefix):]
        return name
138392
function strip(path) {
    var cur;
    var next;
    var str = '';

    for (var i = 0; i < path.length; i++) {
        cur = path.charAt(i);

        if (i !== path.length - 1) {
            next = path.charAt(i + 1);
        }

        if (cur === '/' && (next === '/' || (next === '?' && i > 0))) {
            continue;
        }

        str += cur;
    }

    return (str);
}
639356
def __str_cleanup(line):
        
        if '#' in line:
            line = line.replace("#", "")
            line = line.strip()
        if '-----------' in line:
            line = ''
        return line