|
Console.WriteLine ("Method of String Class");
String StrText = "larger than me";
Console.WriteLine (Strtext.clone ());//clone, return reference to instance
Console.WriteLine (Strtext.compareto ("Larger than Me"))//Compare two objects
Console.WriteLine (Strtext.contains ("than"))//To determine if the object contains "than" and return true
Console.WriteLine (Strtext.endswith ("Me"));//To determine if the end of the object matches "Me", is to return true
Console.WriteLine (Strtext.equals ("larger"))//Judgment object has the same value as the Parameter object
Console.WriteLine (Strtext.getenumerator ());
Console.WriteLine (Strtext.gethashcode ());//hash code
Console.WriteLine (Strtext.gettype ());//Type
Console.WriteLine (Strtext.indexof ("L"))//The position of the parameter L in the object
Console.WriteLine (Strtext.insert (1, "you"))//insert "you" in place
Console.WriteLine (Strtext.isnormalized ()),//whether the object conforms to the Unicode paradigm
Console.WriteLine (Strtext.lastindexof (' m '));//parameter m last seen position
Console.WriteLine (strtext.length);//Length of Object
Console.WriteLine (Strtext.normalize ());
Console.WriteLine (strtext.padleft, ' y '));///Fill the object with Y left to satisfy its length
Console.WriteLine (Strtext.padright, ' X '));///Fill the object with an X right to satisfy the length
Console.WriteLine (Strtext.remove (5));/move out all characters after starting at the specified position
Console.WriteLine (Strtext.replace (' A ', ' Y '));//Replace
Console.WriteLine (Strtext.split (' y '));
Console.WriteLine (Strtext.startswith ("Lar"))//judge whether to start with "Lar"
Console.WriteLine (Strtext.substring (2,6));//substring from start length
Console.WriteLine (Strtext.tochararray ());//Convert an object to an array of characters
Console.WriteLine (Strtext.tolower ());//convert to lowercase copy
Console.WriteLine (Strtext.tolowerinvariant ());
Console.WriteLine (Strtext.tostring ());
Console.WriteLine (Strtext.toupper ());//Capital Form
Console.WriteLine (Strtext.toupperinvariant ());
Console.WriteLine (Strtext.trim ()); The empty object in the object
Console.WriteLine (Strtext.trimend (' m ', ' e '));//Move out of ' m ', ' e ' after the object
|