fork download
  1. Imports System
  2.  
  3. Public Class Test
  4. Public Shared Sub Main()
  5. Dim texto As String = "if Argumento1 = Argumento2 ( --statements; );"
  6.  
  7. Dim ifIndice As Integer = texto.IndexOf("if")
  8. Dim igualIndice As Integer = texto.IndexOf("=")
  9.  
  10. Dim ifLen As Integer = Len("if") + 1
  11.  
  12. Dim argumento1 As String = texto.Substring(ifIndice + ifLen, igualIndice - ifLen)
  13. Dim argumento2 As String = texto.Substring(igualIndice + 2, texto.IndexOf(" (") - igualIndice - 1)
  14. Console.WriteLine(String.Format("Arg1: {0}, Arg2: {1}", argumento1, argumento2))
  15. Console.ReadLine()
  16. End Sub
  17. End Class
Success #stdin #stdout 0.07s 24560KB
stdin
Standard input is empty
stdout
Arg1: Argumento1 , Arg2: Argumento2