1. Packages
  2. String
  3. API Docs
  4. regexp
  5. split
String v1.0.0 published on Friday, Oct 28, 2022 by Pulumi

str.regexp.split

Explore with Pulumi AI

str logo
String v1.0.0 published on Friday, Oct 28, 2022 by Pulumi

    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 int
    count determines the number of substrings to return. If count is not provided, it defaults to substrings. If count is provided then the last substring will be the unsplit remainder. It is an error to pass count < 1.
    On string
    The regex to split on.
    String string
    The string on which to split.
    Count int
    count determines the number of substrings to return. If count is not provided, it defaults to substrings. If count is provided then the last substring will be the unsplit remainder. It is an error to pass count < 1.
    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. If count is not provided, it defaults to substrings. If count is provided then the last substring will be the unsplit remainder. It is an error to pass count < 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. If count is not provided, it defaults to substrings. If count is provided then the last substring will be the unsplit remainder. It is an error to pass count < 1.
    on str
    The regex to split on.
    string str
    The string on which to split.
    count int
    count determines the number of substrings to return. If count is not provided, it defaults to substrings. If count is provided then the last substring will be the unsplit remainder. It is an error to pass count < 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. If count is not provided, it defaults to substrings. If count is provided then the last substring will be the unsplit remainder. It is an error to pass count < 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
    str logo
    String v1.0.0 published on Friday, Oct 28, 2022 by Pulumi