Does anyone know how I can know if a string starts with: for example ca if there is any function for this.
Example:
string cadena = "test";
string comienza = "te";
Does anyone know how I can know if a string starts with: for example ca if there is any function for this.
Example:
string cadena = "test";
string comienza = "te";
Use the StartsWith function of the string class
string cadena = "test";
string comienza = "te";
if (cadena.StartsWith(comienza))
{
//la cadena si comienza
}