Posted By

virgiliodc on 07/01/16


Tagged

String strings cadenas


Versions (?)

Cadenas, String


 / Published in: C#
 

Operaciones con cadenas

  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  

You need to login to post a comment.