Skip to content

StringUtils.stripEnd

Signature: StringUtils.stripEnd(inputString, stripCharacters)

Returns: String result - the stripped string, or null if inputString is null

Strips any of a set of stripCharacters from the end of inputString, handling null by returning null.

Parameters

Type Name Description Default
String inputString the String to be stripped, may be null
String stripCharacters the set of characters to be stripped from the end of the String

Example

StringUtils.stripEnd("This is a test!\r\n", "\n\r!"); // This is a test