“PowerShell Check End of String” Código de respuesta

PowerShell Check End of String

#Program to check if string 1234 comes at the end of the string
$str="checking1234"
if ( $str.endswith("1234") )
{
echo "String $str ends with 1234"
}
Careful Chamois

PowerShell Check End of String

#Program to check if string "check" comes at the begining of the string
 $str="checking1234"
 if ( $str.startswith("check") )
 {
 echo "String $str starts with check"
 }
Careful Chamois

Respuestas similares a “PowerShell Check End of String”

Preguntas similares a “PowerShell Check End of String”

Más respuestas relacionadas con “PowerShell Check End of String” en Shell/Bash

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código