1. Packages
  2. Standard Library
  3. API Docs
  4. startswith
StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi
std logo
StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi

    Determines if the input string starts with the suffix.

    Using startswith

    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 startswith(args: StartswithArgs, opts?: InvokeOptions): Promise<StartswithResult>
    function startswithOutput(args: StartswithOutputArgs, opts?: InvokeOptions): Output<StartswithResult>
    def startswith(input: Optional[str] = None,
                   prefix: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> StartswithResult
    def startswith_output(input: Optional[pulumi.Input[str]] = None,
                   prefix: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[StartswithResult]
    func Startswith(ctx *Context, args *StartswithArgs, opts ...InvokeOption) (*StartswithResult, error)
    func StartswithOutput(ctx *Context, args *StartswithOutputArgs, opts ...InvokeOption) StartswithResultOutput

    > Note: This function is named Startswith in the Go SDK.

    public static class Startswith 
    {
        public static Task<StartswithResult> InvokeAsync(StartswithArgs args, InvokeOptions? opts = null)
        public static Output<StartswithResult> Invoke(StartswithInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<StartswithResult> startswith(StartswithArgs args, InvokeOptions options)
    public static Output<StartswithResult> startswith(StartswithArgs args, InvokeOptions options)
    
    fn::invoke:
      function: std:startswith
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Input string
    Prefix string
    Input string
    Prefix string
    input String
    prefix String
    input string
    prefix string
    input str
    prefix str
    input String
    prefix String

    startswith Result

    The following output properties are available:

    Result bool
    Result bool
    result Boolean
    result boolean
    result bool
    result Boolean

    Package Details

    Repository
    std pulumi/pulumi-std
    License
    std logo
    StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate