Javatpoint.com is changed to TpointTech.com
C# String Replace()The C# Replace() method is used to get a new string in which all occurrences of a specified Unicode character in this string are replaced with another specified Unicode character. There are two methods of Replace() method. You can replace string also. SignatureParameterfirst: it is a first parameter of char type. second: it is a second parameter of char type. ReturnIt returns a string. C# String Replace() Method ExampleOutput: Hello C# C# String Replace() Method Example 2Output: Cheers C#, Cheers .Net, Cheers Javatpoint Next TopicC# String Split() |
Javatpoint.com is now changed to TpointTech.com, so we request you to subscribe our newsletter for further updates.
C# The C# PadRight() method is used to get a new string that left-aligns the characters in this string by padding them with spaces on the right, for a specified total length. Signature public string PadRight(Int32 length) public string PadRight(Int32, Char) Parameter length: it is an integer type parameter. Return It returns...
1 min read
C# The C# ToUpper() method is used to convert string into uppercase. It returns a string. Signature public string ToUpper() public string ToUpper(CultureInfo) Parameter First method does not take any parameter. Return It returns a string C# Method Example using System; ...
1 min read
C# The C# IsInterned() method is used to get reference of the specified string. The difference between Intern() and IsInterned() is that Intern() method interns the string if it is not interned but IsInterned() doesn't do so. In such case, IsInterned() method returns null. Signature public static string IsInterned(String...
2 min read
C# The C# CompareOrdinal() method compares two specified String objects by evaluating the numeric values of the corresponding Char objects in each string. If both strings are equal, it returns 0. If first string is greater than second string, it returns positive number in difference else it...
2 min read
C# The C# PadLeft() method is used to get a new string that right-aligns the characters in this string if the string length is less than the specified length. For example, suppose you have "hello C#" as the string which has 8 length of characters and you...
1 min read
C# The C# IndexOf() is used to get index of the specified character present in the string. It returns index as an integer value. Signature public int IndexOf(Char ch) public int IndexOf(Char, Int32) public int IndexOf(Char, Int32, Int32) public int IndexOf(String) public int IndexOf(String, Int32) public int IndexOf(String, Int32, Int32) public int IndexOf(String, Int32,...
1 min read
C# The C# IsNormalized() method is used to check whether the string is in Unicode normalization form. It returns boolean value. Signature public bool IsNormalized() public bool IsNormalized(NormalizationForm) Parameters It does not take any parameter. Return It returns boolean. C# Method Example using System; using System.Text; public class StringExample ...
1 min read
C# The C# Insert() method is used to insert the specified string at specified index number. The index number starts from 0. After inserting the specified string, it returns a new modified string. Signature public string Insert(Int32 first, String second) Parameters first: It is used to pass as an...
1 min read
C# The C# Trim() method is used to remove all leading and trailing white-space characters from the current String object. Signature public string Trim() public string Trim(params Char[]) Parameter First method does not take any parameter. Second method takes a char array as parameter. Return It returns a string. C# Method Example ...
1 min read
C# The C# Join() methods is used to concatenate the elements of an array, using the specified separator between each element. It returns a modified string. Signature [ComVisibleAttribute(false)] public static string Join(String first, params String[] second) [ComVisibleAttribute(false)] public static string Joint(String, params Object[]) [ComVisibleAttribute(false)] public static string Join (String, IEnumerable<String>) [ComVisibleAttribute(false)] public static string...
1 min read
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India