Cadenas, String


/ Published in: C#
Save to your folder(s)

Operaciones con cadenas


Copy this code and paste it in your HTML
  1. string str = "";
  2. if (string.IsNullOrEmpty(str) == true) //Nulo
  3. int val str.Length//Largo
  4. str2 = str1.Replace("&", "");//Reemplazar cadenas y caracteres y guardar en str2
  5. str.Substring(7, 2);//SubString
  6. str.ToUpper()
  7. str.ToLower()
  8. str.CompareTo(str)//Comparar Unicode
  9. str.IndexOf("Hastings"))//Indice

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.