(input: string)
| 112 | } |
| 113 | |
| 114 | function tokenizeWords(input: string): string[] { |
| 115 | // Treat any non-letter/non-number/non-mark as separators. |
| 116 | const segments = input.split(/[^\p{L}\p{N}\p{M}]+/gu).filter(Boolean); |
| 117 | return segments.flatMap(tokenizeSegment).filter(Boolean); |
| 118 | } |
| 119 | |
| 120 | export function transformCase(input: string, style?: string): string { |
| 121 | const normalized = normalizeStyle(style); |