MCPcopy
hub / github.com/micro-editor/micro / IsWordChar

Function IsWordChar

internal/util/util.go:266–268  ·  view source on GitHub ↗

IsWordChar returns whether or not a rune is a 'word character' Word characters are defined as numbers, letters or sub-word delimiters

(r rune)

Source from the content-addressed store, hash-verified

264// IsWordChar returns whether or not a rune is a 'word character'
265// Word characters are defined as numbers, letters or sub-word delimiters
266func IsWordChar(r rune) bool {
267 return IsAlphanumeric(r) || IsSubwordDelimiter(r)
268}
269
270// IsNonWordChar returns whether or not a rune is not a 'word character'
271// Non word characters are defined as all characters not being numbers, letters or sub-word delimiters

Callers 9

AutocompleteMethod · 0.92
WordAtMethod · 0.92
SelectWordMethod · 0.92
AddWordToSelectionMethod · 0.92
WordRightMethod · 0.92
WordLeftMethod · 0.92
LuaIsWordCharFunction · 0.85
IsNonWordCharFunction · 0.85
IsAutocompleteFunction · 0.85

Calls 2

IsAlphanumericFunction · 0.85
IsSubwordDelimiterFunction · 0.85

Tested by

no test coverage detected