tincho   15-04-2021, 10:57
#1
Esta función imita la homóloga de Go.
Código:
'' <b>GO Package strings</b><br>
'' <u>ContainsAny</u> reports whether any Unicode code points in chars are within s.

Static Public Function ContainsAny(s As String, chars As String) As Boolean

  Dim i As Integer
  Dim b As Boolean = False

  For i = 0 To chars.Len - 1
    If s Like "*" & chars[i, 1] & "*" Then
      b = True
      Break
    Endif
  Next
  Return b
End

Saludos.
Última modificación: 05-06-2022, 20:18 por tincho.

1 Saludo.
  
Usuarios navegando en este tema: 2 invitado(s)
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by Curves UI.