String v1.0.0 published on Friday, Oct 28, 2022 by Pulumi
str.regexp.split
Explore with Pulumi AI
Split a string on a regex.
Using split
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function split(args: SplitArgs, opts?: InvokeOptions): Promise<SplitResult>
function splitOutput(args: SplitOutputArgs, opts?: InvokeOptions): Output<SplitResult>
def split(count: Optional[int] = None,
on: Optional[str] = None,
string: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> SplitResult
def split_output(count: Optional[pulumi.Input[int]] = None,
on: Optional[pulumi.Input[str]] = None,
string: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[SplitResult]
func Split(ctx *Context, args *SplitArgs, opts ...InvokeOption) (*SplitResult, error)
func SplitOutput(ctx *Context, args *SplitOutputArgs, opts ...InvokeOption) SplitResultOutput
> Note: This function is named Split
in the Go SDK.
public static class Split
{
public static Task<SplitResult> InvokeAsync(SplitArgs args, InvokeOptions? opts = null)
public static Output<SplitResult> Invoke(SplitInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<SplitResult> split(SplitArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: str:regexp:split
arguments:
# arguments dictionary
The following arguments are supported:
- on String
- The regex to split on.
- string String
- The string on which to split.
- count Integer
count
determines the number of substrings to return. Ifcount
is not provided, it defaults to substrings. Ifcount
is provided then the last substring will be the unsplit remainder. It is an error to passcount < 1
.
- on string
- The regex to split on.
- string string
- The string on which to split.
- count number
count
determines the number of substrings to return. Ifcount
is not provided, it defaults to substrings. Ifcount
is provided then the last substring will be the unsplit remainder. It is an error to passcount < 1
.
- on String
- The regex to split on.
- string String
- The string on which to split.
- count Number
count
determines the number of substrings to return. Ifcount
is not provided, it defaults to substrings. Ifcount
is provided then the last substring will be the unsplit remainder. It is an error to passcount < 1
.
split Result
The following output properties are available:
- Result List<string>
- The result of the string split.
- Result []string
- The result of the string split.
- result List<String>
- The result of the string split.
- result string[]
- The result of the string split.
- result Sequence[str]
- The result of the string split.
- result List<String>
- The result of the string split.
Package Details
- Repository
- str pulumi/pulumi-str
- License