wordBack

wordFront and wordBack get the word at the beginning or end of given string, respectively.

A word is a streak of consecutive characters — non-whitespace, either all alphanumeric or all not — followed by any number of whitespace.

@safe
T
wordBack
(
T
)
(,
bool excludeWhite = false
)

Parameters

text T

Text to scan for the word.

excludeWhite bool

If true, whitespace will not be included in the word.

Meta