MCPcopy
hub / github.com/codeaashu/claude-code / lastGrapheme

Function lastGrapheme

src/utils/intl.ts:37–44  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

35 * Returns '' for empty strings.
36 */
37export function lastGrapheme(text: string): string {
38 if (!text) return ''
39 let last = ''
40 for (const { segment } of getGraphemeSegmenter().segment(text)) {
41 last = segment
42 }
43 return last
44}
45
46export function getWordSegmenter(): Intl.Segmenter {
47 if (!wordSegmenter) {

Callers 6

processChunkFunction · 0.85
executeLineOpFunction · 0.85
executeXFunction · 0.85
executePasteFunction · 0.85
applyOperatorFunction · 0.85
handleVimInputFunction · 0.85

Calls 2

getGraphemeSegmenterFunction · 0.85
segmentMethod · 0.80

Tested by

no test coverage detected