Some useful text functions
-
@pianofire Yeah i know. its very kind that you posted a summary of all functions.
-
Very, very useful. Thanks a bunch ...
-
Yes, very useful indeed. Any chance for a getInk() function?
-
@vinicity Not sure how you could do that at the moment as there is no getPixel() function
-
@pianofire said in Some useful text functions:
@vinicity Not sure how you could do that at the moment as there is no getPixel() function
Yeah, thought as much. Any chance that getPixel() is coming to Fuze?
-
There is a feature request. Not scheduled as yet
-
@pianofire said in Some useful text functions:
@vinicity Not sure how you could do that at the moment as there is no getPixel() function
I guess I could implement my own ink() variant that sets the ink, and saves the value in a global. Then I could do a getInk() that returns the value...
-
@vinicity That should work
-
Any chance for a solution to my simple problem, i.e. MID$("a simple text", 4, 1). Tried everything - including writing to a file, reading it back, seeking etc. File write limit keeps popping up. So that idea went out of the window. Without simple string functions Fuze is now becoming a nightmare. All I'm trying to do is split - as an example - "D4" into "D" and "4". (chess notation by the way for my chess pgn reader program). Any help would really be appreciated. I'm now desperate! Thanks in advance.
-
You can access a string like an array so in your example text[0] would give you "D" and text[1] would give you "4". If you need more than 1 character you can use a colon eg text[0:1] would give "D4".
-
Also re: file write limit – the write limit occurs when the file is repeatedly opened and closed in a short period of time and not strictly when the write() function is called repeatedly (that is, it occurs when the file is repeatedly written to long-term storage and not when the file is modified in RAM). The write limit can be avoided by keeping the file open while you do reading/writing and only closing it once you're completely done accessing it.