Catrobat.IDE.Core.ExtensionMethods.StringExtensions.StartsWith C# (CSharp) Method

StartsWith() public static method

public static StartsWith ( this s, string value, int startIndex, System.StringComparison comparisonType ) : bool
s this
value string
startIndex int
comparisonType System.StringComparison
return bool
        public static bool StartsWith(this string s, string value, int startIndex, StringComparison comparisonType)
        {
            if (s.Length < startIndex + value.Length) return false;
            return s.IndexOf(value, startIndex, value.Length, comparisonType) == startIndex;
        }