Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

string[] stringArrayRemovePrefix(string $objects[], string $prefix )

Return the input array with the $prefix removed from each item.

Return value

None

Related

stringAddPrefix, stringArrayAddPrefix, stringRemovePrefix

Arguments

Variable Name Variable Type Description
$objectsstring[]The input string array.
$prefixstringThe string to be removed from the beginning of each item in $objects.

MEL examples

 stringArrayRemovePrefix( {}, "+++" );
 // ,Result:,   // 

 stringArrayRemovePrefix( { "a", "b", "c" }, "" );
 // ,Result:, a b c // 

 stringArrayRemovePrefix( { "a", "b", "c" }, "***" );
 // ,Result:, a b c // 

 stringArrayRemovePrefix( { "***a", "***b", "***c" }, "***" );
 // ,Result:, a b c // 

 stringArrayRemovePrefix( { "***a", "+++b", "---c" }, "***" );
 // ,Result:, a +++b ---c // 

 stringArrayRemovePrefix( { "***a", "", "---c" }, "***" );
 // ,Result:, a  ---c //