🤖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

    Scheduled Pinned Locked Moved UIFlow
    2 Posts 1 Posters 2.4k Views 1 Watching
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post