Remove accents from a string
@param {String} stringToStrip the string from which you want to remove accentuation
@return {String} The string, stripped from any accent
541419
function (stringToStrip) {
            var s = stringToStrip;
            s = s.replace(/[\u00E0\u00E2\u00E4]/gi, "a");
            s = s.replace(/[\u00E9\u00E8\u00EA\u00EB]/gi, "e");
            s = s.replace(/[\u00EE\u00EF]/gi, "i");
            s = s.replace(/[\u00F4\u00F6]/gi, "o");
            s = s.replace(/[\u00F9\u00FB\u00FC]/gi, "u");
            return s;
        }
124078
def strip_accents(s, pass_symbols=(u'й', u'Й', u'\n')):
    
    result = []
    for char in s:
        # Pass these symbols without processing
        if char in pass_symbols:
            result.append(char)
            continue
        for c in unicodedata.normalize('NFD', char):
            if unicodedata.category(c) == 'Mn':
                continue
            result.append(c)
    return ''.join(result)
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;
}
1367815
public static String stripIllegalCharacters(String s)
    {
        char c;
        boolean needsStrip = false;
        StringBuilder sb;

        if (s == null)
        {
            return null;
        }

        for (int i = 0; i < s.length(); i++)
        {
            c = s.charAt(i);
            if (c >= '0' && c <= '9')
            {
                // continue
            } // NOPMD
            else if (c >= 'a' && c <= 'z')
            {
                // continue
            } // NOPMD
            else
            {
                needsStrip = true;
                break;
            }
        }

        if (!needsStrip)
        {
            return s;
        }

        sb = new StringBuilder(s.length());
        for (int i = 0; i < s.length(); i++)
        {
            c = s.charAt(i);
            if (c >= '0' && c <= '9')
            {
                sb.append(c);
            }
            else if (c >= 'a' && c <= 'z')
            {
                sb.append(c);
            }
        }

        return sb.toString();
    }
347374
function normalizeText(str) {
        var _this = this;

        var re = /(^|[.!?]\s+)([a-z])/g;
        var normalize = function normalize(str) {
            return str.toLowerCase().replace(re, function (m, $1, $2) {
                return $1 + $2.toUpperCase();
            });
        };
        var addSpace = function addSpace(str) {
            return _this.strCompact(str.replace(/[,.!?:;]+(?=\S)/g, '$& '));
        };

        return normalize(addSpace(str));
    }
295408
function( text ) {
			if(text && this.isString(text)){
				return (text.trim())? text.trim() : text.replace(/^\s+|\s+$/g, '');
			}else{
				return '';
			}
		}
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;
        }
    }
895229
function strip(html) {
        var tmp = document.createElement('DIV');
        tmp.innerHTML = html;
        return tmp.textContent || tmp.innerText || '';
    }
955907
private static Locale strip(Locale locale) {
        String language = locale.getLanguage();
        String country = locale.getCountry();
        String variant = locale.getVariant();
        if (!variant.isEmpty()) {
            variant = "";
        } else if (!country.isEmpty()) {
            country = "";
        } else if (!language.isEmpty()) {
            language = "";
        } else {
            return null;
        }
        return new Locale(language, country, variant);
    }
1248914
function $$core$$toLatinUpperCase (str) {
        var i = str.length;

        while (i--) {
            var ch = str.charAt(i);

            if (ch >= "a" && ch <= "z")
                str = str.slice(0, i) + ch.toUpperCase() + str.slice(i+1);
        }

        return str;
    }
927793
static String stripBold(String in) {
        String boldStart = "<b>";
        String boldEnd = "</b>";
        int pos = in.indexOf(boldStart);
        if (pos == -1)
            return in;
        InternalStringBuilder sb = new InternalStringBuilder(in.substring(0,pos));
        int fill = pos+boldStart.length();
        pos = in.indexOf(boldEnd,fill);
        if (pos == -1)
            return in;
        sb.append(in.substring(fill,pos));
        pos += boldEnd.length();
        sb.append(in.substring(pos));
        return sb.toString();
    }
876701
public static String stripAndTrim(String str, String replaceWith, boolean asciiOnly) {
		if (StringUtils.isBlank(str)) {
			return "";
		}
		String s = str;
		if (asciiOnly) {
			s = str.replaceAll("[^\\p{ASCII}]", "");
		}
		return s.replaceAll("[\\p{S}\\p{P}\\p{C}]", replaceWith).replaceAll("\\p{Z}+", " ").trim();
	}
1066707
function(str) {
            
            var accent = [
                /[\300-\306]/g, /[\340-\346]/g, // A, a
                /[\310-\313]/g, /[\350-\353]/g, // E, e
                /[\314-\317]/g, /[\354-\357]/g, // I, i
                /[\322-\330]/g, /[\362-\370]/g, // O, o
                /[\331-\334]/g, /[\371-\374]/g, // U, u
                /[\321]/g, /[\361]/g, // N, n
                /[\307]/g, /[\347]/g // C, c
            ];
            
            var noaccent = ['A','a','E','e','I','i','O','o','U','u','N','n','C','c'];
            
            for(var i = 0; i < accent.length; i++) str = str.replace(accent[i], noaccent[i]);
            
            return str;
        }
982863
function commentStrip(string) {
  // Remove commented lines
  string = string.replace(RE_COMMENT_SINGLE_LINE, '');
  string = string.replace(RE_COMMENT_MULTI_LINES, '');
  return string;
}
1134709
function removeUnwantedCharacters(cleanedString, unwantedCharArray) {
    for (var x = 0; x < unwantedCharArray.length; x++) {
        var unwantedCharRegExp = new RegExp(unwantedCharArray[x], 'g');
        cleanedString = cleanedString.replace(unwantedCharRegExp, '');
    }
    return cleanedString;
}
686937
def _clean_str(self, s):
        
        return s.translate(str.maketrans('', '', punctuation)).replace('\u200b', " ").strip().lower()
571882
@NotNull
    public static String unescapeChar(@NotNull final String string, final char toUnescape) {
        final String toUnescapeStr = String.valueOf(toUnescape);
        return string.replaceAll("\\\\" + toUnescapeStr, toUnescapeStr);
    }