stripIfNotNone

lsst.daf.butler.core.utils.stripIfNotNone(s)

Strip leading and trailing whitespace if the given object is not None.

Parameters
sstr, optional

Input string.

Returns
rstr or None

A string with leading and trailing whitespace stripped if s is not None, or None if s is None.