String.ensureWrap
ensureWrap($prefix, $suffix) -> string
Description
Add $prefix
and $suffix
to the beginning and end of the string, if both do not already exist.
'ACCEPTED'.ensureWrap('(', ')') //= '(ACCEPTED)' '(ACCEPTED)'.ensureWrap('(', ')') //= '(ACCEPTED)'