Handle special case
177916
function preHandleSrc (cssSrc) {

            /* 
             * fix like: .a{ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e6529dda', endColorstr='#e6529dda', GradientType=0)\9;}
             * which has two semicolon( : ) will cause parse error.
             */
            cssSrc = cssSrc.replace(/progid(\s)?:(\s)?/g, '#tidy1#');

            /*
             * fix absolute url path like: 
             * .a { background: url("http://www.qq.com/one.png");} 
             *
             */

            cssSrc = cssSrc.replace(/:\/\//g, '#tidy2#');

            /*
             * fix base64 url like: 
             * .a { background: url("data:image/png;base64,iVBOMVEX///////////////+g0jAqu8zdII=");} 
             *
             */
            cssSrc = cssSrc.replace(/data[\s\S]+?\)/g, function(match){
                match = match.replace(/:/g, '#tidy3#');
                match = match.replace(/;/g, '#tidy4#');
                match = match.replace(/\//g, '#tidy5#');
                return match;
            });

            /*
             * fix multiple line comment include single comment //
             * eg: / * sth // another * /
             */
            cssSrc = cssSrc.replace(/\/\*[\s\S]+?\*\//g, function(match){
                // handle single comment //
                match = match.replace(/\/\//g, '#tidy6#');
                return  match;
            });

            /*
             * fix single comment like:  // something 
             * It can't works in IE, and will cause parse error
             * update: handle single line for compressive case
             */
            cssSrc = cssSrc.replace(/(^|[^:|'|"|\(])\/\/.+?(?=\n|\r|$)/g, function(match){
                // Handle compressive file
                if (match.indexOf('{') === -1 || match.indexOf('}') === -1) {
                    var targetMatch;

                    //handle first line
                    if (match.charAt(0) !== '/' ) {
                        // remove first string and / and \ 
                        targetMatch = match.substr(1).replace(/\\|\//g, '');
                        return match.charAt(0) + '/*' + targetMatch + '*/';
                    } else {
                        targetMatch = match.replace(/\\|\//g, '');
                        return '/*' + targetMatch + '*/';
                    }
                } else {
                    throw new Error('There maybe some single comment // in this file.');
                }
            });

            return cssSrc;
        }
581109
function apply_rule(name, gcase, rule) {
        var mod;
        if (gcase === 'nominative') mod = '.';
        else {
            for (var i = 0; i < predef.cases.length; i++) {
                if (gcase === predef.cases[i]) {
                    mod = rule.mods[i - 1];
                    break;
                }

            }
        }

        for (var i = 0; i < mod.length; i++) {
            var chr = mod[i];
            switch (chr) {
                case '.':
                    break;
                case '-':
                    name = name.substr(0, name.length - 1);
                    break;
                default:
                    name += chr;
            }
        }
        return name;
    }
1144821
def case_sensitive(self, lst):
        
        dictionary = {}
        for pkg in lst:
            dictionary[pkg.lower()] = pkg
        return dictionary
1117622
def p_case_clause(self, p):
        """"""
        p[0] = ast.Case(expr=p[2], elements=p[4])
1345429
def handle(text)
      text.gsub!(/^([ \t#]*):(\w+):\s*(.+)?\n/) do 
        prefix    = $1
        directive = $2.downcase
        param     = $3

        case directive
        when "include"
          filename = param.split[0]
          include_file(filename, prefix)

        else
          yield(directive, param)
        end
      end
    end
1169245
def p_case_clause(self, p):
        """"""
        p[0] = self.asttypes.Case(expr=p[2], elements=p[4])
        p[0].setpos(p)
976324
def bin_case_insensitive(self):
        
        if "--case-ins" in self.flag:
            data_dict = Utils().case_sensitive(self.names)
            for key, value in data_dict.iteritems():
                if key == self.name.lower():
                    self.name = value
428163
def uppercase(self, value):
        """"""
        if not isinstance(value, bool):
            raise TypeError('uppercase attribute must be a logical type.')
        self._uppercase = value
1236775
def is_equal_strings_ignore_case(first, second):
    """"""
    if first and second:
        return first.upper() == second.upper()
    else:
        return not (first or second)
1232047
def normal_case(name):
    """"""
    s1 = re.sub(r'(.)([A-Z][a-z]+)', r'\1 \2', name)
    return re.sub(r'([a-z0-9])([A-Z])', r'\1 \2', s1).lower()
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()
5687
function handlePlainCharacter(element, char) {
  const prefix = element[typedPrefixKey] || '';
  element[typedPrefixKey] = prefix + char;
  element.selectItemWithTextPrefix(element[typedPrefixKey]);
  setPrefixTimeout(element);
}
119411
@Override
    protected synchronized void handleTransliterate(Replaceable text,
                                       Position offsets, boolean isIncremental) {
        // TODO reimplement, see ustrcase.c
        // using a real word break iterator
        //   instead of just looking for a transition between cased and uncased characters
        // call CaseMapTransliterator::handleTransliterate() for lowercasing? (set fMap)
        // needs to take isIncremental into account because case mappings are context-sensitive
        //   also detect when lowercasing function did not finish because of context

        if (offsets.start >= offsets.limit) {
            return;
        }

        // case type: >0 cased (UCaseProps.LOWER etc.)  ==0 uncased  <0 case-ignorable
        int type;

        // Our mode; we are either converting letter toTitle or
        // toLower.
        boolean doTitle = true;

        // Determine if there is a preceding context of cased case-ignorable*,
        // in which case we want to start in toLower mode.  If the
        // prior context is anything else (including empty) then start
        // in toTitle mode.
        int c, start;
        for (start = offsets.start - 1; start >= offsets.contextStart; start -= UTF16.getCharCount(c)) {
            c = text.char32At(start);
            type=csp.getTypeOrIgnorable(c);
            if(type>0) { // cased
                doTitle=false;
                break;
            } else if(type==0) { // uncased but not ignorable
                break;
            }
            // else (type<0) case-ignorable: continue
        }

        // Convert things after a cased character toLower; things
        // after a uncased, non-case-ignorable character toTitle.  Case-ignorable
        // characters are copied directly and do not change the mode.

        iter.setText(text);
        iter.setIndex(offsets.start);
        iter.setLimit(offsets.limit);
        iter.setContextLimits(offsets.contextStart, offsets.contextLimit);

        result.setLength(0);

        // Walk through original string
        // If there is a case change, modify corresponding position in replaceable
        int delta;

        while((c=iter.nextCaseMapCP())>=0) {
            type=csp.getTypeOrIgnorable(c);
            if(type>=0) { // not case-ignorable
                if(doTitle) {
                    c=csp.toFullTitle(c, iter, result, caseLocale);
                } else {
                    c=csp.toFullLower(c, iter, result, caseLocale);
                }
                doTitle = type==0; // doTitle=isUncased

                if(iter.didReachLimit() && isIncremental) {
                    // the case mapping function tried to look beyond the context limit
                    // wait for more input
                    offsets.start=iter.getCaseMapCPStart();
                    return;
                }

                /* decode the result */
                if(c<0) {
                    /* c mapped to itself, no change */
                    continue;
                } else if(c<=UCaseProps.MAX_STRING_LENGTH) {
                    /* replace by the mapping string */
                    delta=iter.replace(result.toString());
                    result.setLength(0);
                } else {
                    /* replace by single-code point mapping */
                    delta=iter.replace(UTF16.valueOf(c));
                }

                if(delta!=0) {
                    offsets.limit += delta;
                    offsets.contextLimit += delta;
                }
            }
        }
        offsets.start = offsets.limit;
    }
641020
function transformCase(str, transFn = 'pascalCase') {
  if (!allowedNameTransforms.hasOwnProperty(transFn)) {
    const message = `Invalid transform, allowed transform functions are:\n
    ${Object.keys(allowedNameTransforms).join(', ')}]`;
    throw new Error(message);
  }
  return changeCase[transFn](str);
}
879779
def to_pascal_case(s):
    
    return re.sub(r'(?!^)_([a-zA-Z])', lambda m: m.group(1).upper(), s.capitalize())
941103
def to_snake_case(s):
    """"""
    return re.sub('([^_A-Z])([A-Z])', lambda m: m.group(1) + '_' + m.group(2).lower(), s)
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()