🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    substring substr get part of a string

    UIFlow
    1
    2
    1.4k
    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.
    • H
      Hnerik Schmidt
      last edited by

      This is probably obvious to everyone but me but I cant find any hit on google to explain how to get a part of a string into a new variable.

      As a reference to what I want to do: in most languages its is called something like substr( stringname, startposition, number of chars )

      1 Reply Last reply Reply Quote 0
      • H
        Hnerik Schmidt
        last edited by

        I was looking for this for 2 hours and after posting I found a solution by chance after 5 min.
        I will leave this with my solution if someone have the same problem later.
        this page show how it is done in python:
        https://www.freecodecamp.org/news/how-to-substring-a-string-in-python/
        now I started trying to find any function in UIflow that could replicate this and...

        "bytearray in list xxx get sub-list from # to #" actually writes this code!

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