The Cusp of Helix

Reference of Intact Case
[tokenize]

(array) tokenize (delimiter = '_', raw_first = false)

Explode compound words to tokens.

Parameters:

nametypedefaultcaption
delimiterstring'_'Delimiter.
rawFirstbooleanfalseKeep raw first word in tokens for camelCase.

Returns:

  • (array) — tokens.

Author:

  • StewEucen

Since:

  • Version 1.0.0

Examples:

"highClass".tokenize() #=> ['High', 'Class'] "highClass".tokenize('_', true) #=> ['high', 'Class'] "StudlyCaps".tokenize() #=> ['Studly', 'Caps'] "snake_case".tokenize() #=> ['snake', 'case'] "get_utc__day".tokenize() #=> ['get', 'utc_', 'day']