Free library String Tokens Arduino
Автор: resonance2001
Загружено: 2024-10-18
Просмотров: 12
Here is the link to the Arduino library:
https://1drv.ms/u/c/10e4c6381770628b/...
It is called “StringTokenizer” and was inspired by a similar thing in the Java programming language.
I’ve tested it on an Arduino Uno, Mega and Raspberry Pi Pico 2 with no issues.
This takes a long string in flash memory (using PROGMEM but remember that ‘static’ keyword if the string is in a function unless you declare it to be a global string).
This splits the string in to tokens which are substrings but to mark where you want it split, you supply delimiters which can be one such as a space or many for example “:;.()” which splits the string when it encounters one or more consecutive delimiters.
You can step forwards and backwards through the tokens. I intended this for use with stepping through information such as databases or even interpreting code. I may add to its functionality in the future.
This library uses ‘near’ pointers for strings contained within the first 64 kB of memory so I suppose if your string is gigantic or maybe a microcontroller places the string beyond that memory, it won’t work unless the library uses ‘far’ pointers. If I encounter issues like this, I will address it but I’ve had no problems in my tests.
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: