Package proguard.util
Class PrefixRemovingStringFunction
java.lang.Object
proguard.util.PrefixRemovingStringFunction
- All Implemented Interfaces:
StringFunction
This
StringFunction removes a given prefix from each transformed String, if present.-
Field Summary
Fields inherited from interface proguard.util.StringFunction
IDENTITY_FUNCTION -
Constructor Summary
ConstructorsConstructorDescriptionPrefixRemovingStringFunction(String prefix) Creates a new PrefixRemovingStringFunction.PrefixRemovingStringFunction(String prefix, StringFunction stringFunction) Creates a new PrefixRemovingStringFunction.PrefixRemovingStringFunction(String prefix, StringFunction successStringFunction, StringFunction failStringFunction) Creates a new PrefixRemovingStringFunction. -
Method Summary
-
Constructor Details
-
PrefixRemovingStringFunction
Creates a new PrefixRemovingStringFunction.- Parameters:
prefix- the prefix to remove from each string.
-
PrefixRemovingStringFunction
Creates a new PrefixRemovingStringFunction.- Parameters:
prefix- the prefix to remove from each string.stringFunction- the function to subsequently apply to all strings.
-
PrefixRemovingStringFunction
public PrefixRemovingStringFunction(String prefix, StringFunction successStringFunction, StringFunction failStringFunction) Creates a new PrefixRemovingStringFunction.- Parameters:
prefix- the prefix to remove from each string.successStringFunction- the function to subsequently apply to prefixed strings.failStringFunction- the function to subsequently apply to other strings.
-
-
Method Details
-
transform
Description copied from interface:StringFunctionTransforms the given string into a new string.- Specified by:
transformin interfaceStringFunction
-