Converts to lowercase, removes non-word characters (alphanumerics and
    underscores) and converts spaces to hyphens. Also strips leading and
    trailing whitespace.
436735
def slugify(value):
    
    if six.PY3:
        value = str(value)
    else:
        value = unicode(value)

    value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
    value = to_remove.sub('', value).strip().lower()
    return remove_dup.sub('-', value)
746797
def strip_spaces(x):
    
    x = x.replace(b' ', b'')
    x = x.replace(b'\t', b'')
    return x
578213
def underscores_to_camelcase(argument):
    '''  '''
    result = ''
    previous_was_underscore = False
    for char in argument:
        if char != '_':
            if previous_was_underscore:
                result += char.upper()
            else:
                result += char
        previous_was_underscore = char == '_'
    return result
874837
def alpha_cased(text, lower=False):
    
    text = "".join(filter(
            lambda c: c.isalpha() or c == GENERIC_PROTOCOL_KEY, text))
    return text.lower() if lower else text.upper()
565205
def clean_text(s):
    """"""
    SPACES_RE = re.compile(r'\s+')
    SPECIAL_CHARS_RE = re.compile(r'[^\w\s\.\-\(\)]')
    s = SPACES_RE.sub(' ', s)
    s = s.strip()
    s = SPECIAL_CHARS_RE.sub('', s)
    return s
892771
def _trim(self, somestr):
        
        tmp = RE_LSPACES.sub("", somestr)
        tmp = RE_TSPACES.sub("", tmp)
        return str(tmp)
151084
def lowercase_chars(string: any) -> str:
        """"""
        return ''.join([c if c.islower() else '' for c in str(string)])
571463
public static String lowerCase(String str) {
        if(isNullOrEmpty(str)) {
            return str;
        }
        return str.toLowerCase(LOCALE_ENGLISH);
    }
1023437
def convert_case(name):
        """"""
        s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
        return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
377845
def _remove_trailing_spaces(text: str) -> str:
        
        clean_text = str()

        for line in text.splitlines(True):
            # remove trailing spaces (0x20) and tabs (0x09)
            clean_text += line.rstrip("\x09\x20")

        return clean_text
996531
def slugify(value, hyphenate=True, lower=True):
    
    import unicodedata
    value = unicodedata.normalize('NFKD', value).strip()
    replacement = '-' if hyphenate else ''
    if lower: value = value.lower()
    return _CHANGEME_RE.sub(replacement, value)
587558
public static String hyphenCaseToCamelCase(String s) {

        List<String> words = Stream.of(s.split("-")).filter(w -> !"".equals(w)).collect(Collectors.toList());

        if (words.size() < 2) {
            return s;
        }

        StringBuilder parsedString = new StringBuilder(words.get(0));

        for (int i = 1; i < words.size(); i++) {

            parsedString.append(Character.toUpperCase(words.get(i).charAt(0))).append(words.get(i).substring(1));
        }

        return parsedString.toString();
    }
796430
def fix_whitespace(tokens, start, result):
    """"""
    for e in result:
        for child in e.iter():
            child.text = child.text.replace(' , ', ', ')
            for hyphen in HYPHENS:
                child.text = child.text.replace(' %s ' % hyphen, '%s' % hyphen)
            child.text = re.sub(r'- (.) -', r'-\1-', child.text)
    return result
801592
def lowercase(text_string):
    '''
    
    '''
    if text_string is None or text_string == "":
        return ""
    elif isinstance(text_string, str):
        return text_string.lower()
    else:
        raise InputError("string not passed as argument for text_string")
257535
def camelcase_to_underscores(word):
    
    s1 = _FIRST_CAP_RE.sub(r'\1_\2', word)
    return _ALL_CAP_RE.sub(r'\1_\2', s1).lower()
417774
def underscore_to_camelcase(underscore_string)
      underscore_string = underscore_string.gsub(/(_)/,' ').split(' ').each { |word| word.capitalize! }.join("") unless underscore_string.match(/_/).nil?
      underscore_string = underscore_string if underscore_string.match(/_/).nil?
      return underscore_string
    end
999382
public static String hyphenToCamelCase(String hyphenStr) {
        if (hyphenStr == null || hyphenStr.isEmpty()) return hyphenStr;
        int p = hyphenStr.indexOf('-');
        if (p == -1) return hyphenStr;
        StringBuilder sb = new StringBuilder(hyphenStr);
        do {
            int i = p + 1;
            if (i < sb.length()) {
                sb.setCharAt(i, Character.toUpperCase(sb.charAt(i)));
            }
            sb.deleteCharAt(p);
            p = sb.indexOf("-", p);
            if (p == -1) break;
        } while (true);

        return sb.toString();
    }