Strings Articles

String Extractors And Manipulators – The "Mid" Function (Part – III)

Although OOPS is the most powerful techniqueto manipulate data in a secure manner, the need to apply this powerwith caution arises due to the way classes are used or are going to beused by other programmers. The string class in Java takes input throughobjects of its type only. But in the above class, if the [...]

Read more

String Manipulators And Extractors – Part II

  Before proceeding with class indexers, let usquickly look at the following piece of code which compares two stringsbut in a slightly different manner in that each string is scanned intoa char variable and then compared. Since each character has to becompared, each character needs to be extracted from the strings. Andsince, a 'char' ('a') [...]

Read more

String Extraction And Insertion In C#

  The following is the class that replaces one string with another stringspecified by the user. Just as in Java or any other language,C#(C-Sharp) also has string manipulators but since we are talking aboutoriginal pieces of codes, I have written the following piece oforiginal method called getstr–which gets a string from another throughan object of [...]

Read more

String Jargon in C#

The following examples illustrates the usage of C# Stringclass functions.It also list some additional functions whichare not currently available in C#. using System; class MyString{ public static void Main() { String strData="WeLcOmE tO c#.eNjoy FoLkS"; Console.WriteLine("String Value: {0}",strData); Console.WriteLine("LowerCase Equivalent: {0}",Lower(strData)); Console.WriteLine("UpperCase Equivalent: {0}",Upper(strData)); Console.WriteLine("PCase Equivalent: {0}",PCase(strData)); Console.WriteLine("Reverse Equivalent: {0}",Reverse(strData)); Console.WriteLine("Is 'rotator' PalinDrome:{0}",IsPalindrome("rotator")); Console.WriteLine("Is 'visualc#' [...]

Read more
  • Page 2 of 2
  • <
  • 1
  • 2