Graphics

 View Only
  • 1.  Text splitting

    Posted 08-11-2025 05:00

    I have a string of text,
    Presented in the form of  -1/0/-1/15
    I want to extract 4 texts from -1, 0, -1, and 15 respectively
    Please note that each text is dynamic,  and may be negative or positive, single or double digit



    ------------------------------
    Judy
    ------------------------------



  • 2.  RE: Text splitting

    Posted 08-11-2025 09:25

    First, why is the first value expected to be "01", when it is "-1" in the string? I assume that's a typo.

    Also, I assume you want to do this with scripting and not Visual Logic.

    You can just use String.Split:

    Dim s as String = "-1/0/-1/15"
    Dim parts As String() = s.Split("/")

    Now the parts array has the values. They are still strings. If you want to convert them to numbers:

    For i As Integer = 0 To parts.Length-1
    	parts(i) = CInt(parts(i))
    Next


    ------------------------------
    JohnCorigliano
    Senior Software Engineer
    ISC
    ------------------------------



  • 3.  RE: Text splitting

    Posted 08-11-2025 22:48

    sorry ,The spelling was wrong, it has been corrected
    I don't really understand String. Split

    I copied it and didn't see any effect
    If possible, could you please help me create a simple XP project



    ------------------------------
    Judy
    ------------------------------



  • 4.  RE: Text splitting

    Posted 08-25-2025 09:36

    Hi,
    I did some visual logic and I got it working :

    here is the Scene as well as attachment file
    let me know if you need more help or explanation on this.



    ------------------------------
    Alrik Prevel
    Demo Artist & Trainer
    Ross Video
    ------------------------------