Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    How to Parse a String?

    Help
    2
    3
    137
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Tranceaholic F last edited by

      How would I go about reading a string one character at a time? I can't find a command like midstr (that lets you find out what text is in a certain position). I only see commands for finding specific text.

      1 Reply Last reply Reply Quote 1
      • M
        MikeDX last edited by MikeDX

        you can treat a string like an array, or you can grab individual parts with colon notation

        name = "Mike"
        
        print (name[0]) // this prints M
        
        print (name[1:]) // this prints ike
        
        print (name[:2]) // this prints Mik
        
        
        1 Reply Last reply Reply Quote 2
        • T
          Tranceaholic F last edited by

          Cool, thank you!

          1 Reply Last reply Reply Quote 1
          • First post
            Last post