Takes a string or symbol that uses snake case and converts it to a camel case symbol.

 @param [String, Symbol] value The string or symbol to convert to camel case.

 @return [Symbol]
973023
def snake_case_to_camel_case(value)
      pieces = value.to_s.split '_'

      (pieces.first + pieces[1..-1].map(&:capitalize).join).to_sym
    end
638109
def camel_to_snake_case(string):
    
    s = _1.sub(r'\1_\2', string)
    return _2.sub(r'\1_\2', s).lower()
1136120
def snake_case(string):
    
    if not string:
        return string
    string = string.replace('-', '_').replace(' ', '_')
    return de_camel(string)
1248053
def normalize_value(value)
      unless value.is_a?(Hash)
        value = value.respond_to?(:to_ary) ? value.to_ary : value.to_str
      end

      # Handle unicode normalization
      if value.kind_of?(Array)
        value.map! { |val| Addressable::IDNA.unicode_normalize_kc(val) }
      elsif value.kind_of?(Hash)
        value = value.inject({}) { |acc, (k, v)|
          acc[Addressable::IDNA.unicode_normalize_kc(k)] =
            Addressable::IDNA.unicode_normalize_kc(v)
          acc
        }
      else
        value = Addressable::IDNA.unicode_normalize_kc(value)
      end
      value
    end
864783
def camelcase v
      case
        when v.is_a?(Array)
          v.map {|i| camelcase(i)}
        when v.is_a?(Hash)
          result = {}
          v.each do |k, val|
            result[k.to_s().camelcase(:lower)] = camelcase(val)
          end
          result
        else
          v
      end
    end
715535
def snake_to_camel(value):
    
    camel = "".join(word.title() for word in value.split("_"))
    return value[:1].lower() + camel[1:]
1323078
private Object prettyPrintValueString(final Object value) {
        if (value instanceof String) {
            return value.equals("") ? "\"\"" : value;
        } else {
            return value.toString();
        }
    }
1291022
def as(type_symbol)
      return case type_symbol.to_sym
      when :string, :text, :integer, :float, :datetime
        self.send("#{type_symbol}_value".to_sym)
      when :date
        self.datetime_value.nil? ? nil : self.datetime_value.to_date
      when :time
        self.datetime_value.nil? ? nil : self.datetime_value.to_time
      else # :answer_id
        self.answer_id
      end
    end
787848
def to_camel_keys(value = self)
      case value
      when Array
        value.map { |v| to_camel_keys(v) }
      when Hash
        Hash[value.map { |k, v| [camelize_key(k), to_camel_keys(v)] }]
      else
        value
      end
    end
798542
def snake_to_camel(snake_str):
    '''
    
    '''
    components = snake_str.split('_')
    if len(components) > 1:
        camel = (components[0].lower() +
                 ''.join(x.title() for x in components[1:]))
        return camel
    # Not snake_case
    return snake_str
381401
def convert(value)
      case value
      when java.util.List then value.to_a
      when java.util.Set then value.to_set
      when java.util.Map then value.to_hash
      else value
      end
    end
632335
def normalize_value(value, snake_case=True):
    
    if not isinstance(value, six.string_types):
        raise TypeError("the value passed to value must be a string")

    if snake_case:
        s1 = first_cap_re.sub(r'\1_\2', value)
        new_value = all_cap_re.sub(r'\1_\2', s1).lower()  # .replace('-', '_')
    else:
        new_value = value.lower()

    return new_value
492655
def camel_to_snake_case(name):
    """"""
    pattern = r'[A-Z][a-z]+|[A-Z]+(?![a-z])'
    return '_'.join(map(str.lower, re.findall(pattern, name)))
1271156
function convert(key, value) {
  key = camel(key);
  if (is.string(value)) return key + '_str';
  if (isInt(value)) return key + '_int';
  if (isFloat(value)) return key + '_real';
  if (is.date(value)) return key + '_date';
  if (is.boolean(value)) return key + '_bool';
}
65702
def camel_case(string):
    
    if not string:
        return string
    parts = snake_case(string).split('_')
    rv = ''
    while parts:
        part = parts.pop(0)
        rv += part or '_'
        if part:
            break
    return rv + ''.join(x.title() for x in parts)
832173
def to_ruby_value
      bare_value = to_value
      case value_type
      when :utf8
        bare_value.to_utf8
      when Array
        value_type[1].wrap bare_value
      when Class
        value_type.wrap bare_value
      else
        bare_value
      end
    end
1358215
def to_snake(camel):
    """"""
    if not camel:
        return camel
    return ''.join('_' + x if 'A' <= x <= 'Z' else x for x in camel).lower()[camel[0].isupper():]