String.strip#

usencrypt.cipher.String.strip(self, arr=None)#

Returns a copy of the encrypted string \(E(x)\) with the leading and trailing characters removed.

Parameters

arr (list or np.ndarray of usencrypt.cipher.Char) – List specifying the set of characters to be removed. Defaults to None. If None, spaces are removed.

Returns

The stripped string.

Return type

usencrypt.cipher.String

Examples
>>> import usencrypt as ue
>>> test = ue.encrypt("AABAA")
>>> test = test.strip("A")
>>> test
"B"