/**
 * Reduces multiple slashes in a string to single slashes.
 *
 * @return self Returns instance of The Strings class.
 */
public function reduceSlashes(): self

Examples

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

echo $string;

The above example will output:

some/text/here

Getting Started

Methods