unenclosed

Removes paired preceding and trailing tokens around a string line. Assumes ASCII.

You should normally not need to use this directly; rather see unquoted and unsinglequoted for the usual cases.

@safe pure nothrow @nogc
unenclosed
(
char token = '"'
)
(
return scope string line
)

Parameters

token

Token character to strip away.

line string

String line to remove any enclosing tokens from.

Return Value

Type: auto

A slice of the passed string line without enclosing tokens.

See Also