String starts with and ends with
using System;
class MainClass {
public static void Main() {
string str = "abcdefghijk";
if(str.StartsWith("abc"))
Console.WriteLine("str begins with \"abc\"");
if(str.EndsWith("ijk"))
Console.WriteLine("str ends with \"ijk.\"");
}
}
Output str begins with "abc"
str ends with "ijk."
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
|