/**
 * Removes any leading and trailing slashes from a string.
 *
 * @return self Returns instance of The Strings class.
 */
public function trimSlashes(): self

Examples

$string = Strings::create('some string here/')->trimSlashes();

echo $string;

The above example will output:

some string here

Getting Started

Methods