The Cusp of Helix

Intact Case リファレンス
[tokenize]

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

camelCase や StudlyCaps 、 snake_case などの複合語を、トークンに分割します。

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']