Home About Rice Downloads Documents Others Cooker CookerGX
Documents  >  Class  >  string  >  StartsWith(string)
string class : StartsWith(string) method

Description

It returns a boolean value that represents whether caller string starts with argument.

Syntax

stringInstance.StartsWith(string startString)

Arguments

ClassNameDescription
stringstartStringA start string.

Return value

ClassDescription
boolA boolean value that represents whether caller string start with argument.

Sample code

1:

string str = "sample string";

2:

bool startWith = str.StartsWith("sample"); // The result (startWith) is true.

Notes

This method is a member introduced from the Rice ver 1.0.1.1.

It's a wrapper of the System.String.StartsWith(String).

If caller string starts with argument, it returns true. Otherwise, it returns false.

Links for reference

Copyright © Rice All rights reserved.