lib/intact_case/modules.rb
#
# Tokenize compound words from camelCase|StudlyCaps.
#
# @author StewEucen
# @param  [string] delimiter Delimiter between acronym.
# @param  [boolean] raw_first Keep raw first word in tokens for camelCase.
# @return [array] Tokens except delimiter between acronym.
# @since  Release 1.0.0
#
Tokenize compound words from camelCase|StudlyCaps.
Tokenize compound words from camelCase|StudlyCaps .
def _tokenize_from_camelized(delimiter, raw_first)
            d = Regexp.escape(delimiter)
            p = /(?:[A-Z]+|[A-Z]?(?:[a-z]{2,}#{d}?|[a-z]))(?![a-z])/;
            tokens = self.scan(p)
            tokens[0] = tokens[0].studly_caps(delimiter) unless raw_first
            tokens
          end
def _tokenize_from_camelized ( delimiter , raw_first ) d = Regexp . escape ( delimiter ) p = / (?:[A-Z]+|[A-Z]?(?:[a-z]{2,} #{ d } ?|[a-z]))(?![a-z]) / ; tokens = self . scan ( p ) tokens [ 0 ] = tokens [ 0 ] . studly_caps ( delimiter ) unless raw_first tokens end
Tokenize compound words from camelCase|StudlyCaps.
Tokenize compound words from camelCase|StudlyCaps .
# (?:                              : token body #   [A-Z]+                         : acronym #   |                              : or #   [A-Z]?(?:[a-z]{2,}#{d}?|[a-z]) : usual word|first in camelCase| # ) # (?![a-z])                        : break word same as (?=[A-Z]|_|$) # Upcase for acronym of first word in camelCase.
Tokens except delimiter between acronym.
Tokens except delimiter between acronym .
array
delimiter
raw_first
raw_first Keep raw first word in tokens for camelCase.
raw_first Keep raw first word in tokens for camelCase .
author
None
since
None