# coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = [
    'SplitResult',
    'AwaitableSplitResult',
    'split',
    'split_output',
]

@pulumi.output_type
class SplitResult:
    def __init__(__self__, result=None):
        if result and not isinstance(result, list):
            raise TypeError("Expected argument 'result' to be a list")
        pulumi.set(__self__, "result", result)

    @property
    @pulumi.getter
    def result(self) -> Sequence[str]:
        return pulumi.get(self, "result")


class AwaitableSplitResult(SplitResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return SplitResult(
            result=self.result)


def split(separator: Optional[str] = None,
          text: Optional[str] = None,
          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableSplitResult:
    """
    Produces a list by dividing a given string at all occurrences of a given separator
    """
    __args__ = dict()
    __args__['separator'] = separator
    __args__['text'] = text
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('std:index:split', __args__, opts=opts, typ=SplitResult).value

    return AwaitableSplitResult(
        result=__ret__.result)


@_utilities.lift_output_func(split)
def split_output(separator: Optional[pulumi.Input[str]] = None,
                 text: Optional[pulumi.Input[str]] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[SplitResult]:
    """
    Produces a list by dividing a given string at all occurrences of a given separator
    """
    ...
