Zebra0.com

csharp stringsStrings in C#

Strings in C#

Learn C# (C sharp) in FREE step-by-step lessons.

Module 11: Strings in C#

There are many functions for working with strings.
For instance, you can extract just part of a string, tell if one string is embedded inside another string, and replace one string with another.


Goals:

Objectives:

Print the lesson

Please study the material at each of the links below.

  1. Microsoft Reference Microsoft Reference: Strings and String methods
  2. String Functions: Examples of the most used string methods
  3. String Length: Length gives the number of ALL characters in the String
  4. String Substr: Substr extracts a portion of a string
  5. Names: Using String Functions: Split name into first and last
  6. Escape Sequence: \ and @ Escape Sequence: \ and @: Using the \ and @ with strings with special characters
  7. Is string a valid Social Security Number?: A valid Social Security number has 9 digits
  8. Regular Expressions: A regular expression is a way to determine if a string matches a pattern.
  9. Regular Expressions for a sentence: A sentence must have letters of the alphabet and end with . ? or !
  10. Regular Expression for Robot: R2D2, C3P0?: Regex robotregx= new Regex(@"([A-Z][0-9]){2}");
  11. Regular Expression Drill: Test your understanding
  12. Scramble Array Algorithm Scramble Array Algorithm: Easy algorithm to scramble (shuffle) an array
  13. Anagram Demo: An anagram is simply the letters of the word scrambled
  14. Anagrams: Details for creating the form
  15. Cryptogram Demo: A cryptogram shuffles the alphabet to create a code
GlossaryGlossary for strings lesson
Full Glossary