Jump to content
YOUR-AD-HERE
HOSTING
TOOLS

Locked [Función]sSplit 2 delimitadores[Vb.Net]


fudmario

Recommended Posts

[LENGUAJE=vbnet]

 

Public Function sSplit(ByVal cadena As String, ByVal del1 As String, ByVal del2 As String)

 

Try

Dim Res As String

Dim s, b As Short

 

s = cadena.IndexOf(del1) + del1.Length + 1 '

b = cadena.Substring(s).IndexOf(del2) + 1 '

Res = Mid(cadena, s, b)

 

Return Res

Catch ex As Exception

Return ""

End Try

 

End Function

[/LENGUAJE]

[LENGUAJE=vbnet]

'Ejemplo de Uso:

'Dim total As String = "Hola que tal esto es un ejemplo en vbnet por fudmario"

'MessageBox.Show(sSplit(total, "tal", "en"))

'devuelve:"esto es un ejemplo "[/LENGUAJE]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.