Share via


String.Transform(IFunction) Method

Definition

This method allows the application of a function to this string.

[Android.Runtime.Register("transform", "(Ljava/util/function/Function;)Ljava/lang/Object;", "", ApiSince=34)]
[Java.Interop.JavaTypeParameters(new System.String[] { "R" })]
public Java.Lang.Object? Transform (Java.Util.Functions.IFunction f);
[<Android.Runtime.Register("transform", "(Ljava/util/function/Function;)Ljava/lang/Object;", "", ApiSince=34)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "R" })>]
member this.Transform : Java.Util.Functions.IFunction -> Java.Lang.Object

Parameters

f
IFunction

a function to apply

Returns

the result of applying the function to this string

Attributes

Remarks

This method allows the application of a function to this string. The function should expect a single String argument and produce an R result.

Any exception thrown by f.apply() will be propagated to the caller.

Added in 12.

Java documentation for java.lang.String.transform(java.util.function.Function<? super java.lang.String, ? extends R>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to