Hi Martin, many thanks for your initiative, it is greatly appreciated! It would be extremely useful to also define some API for string handling right from the start, to be able to use the string type in externals... all those functionality that seems to be contained in your str object.
best greetings, Thomas
PS. It would be good to submit the patch to the sourceforge PD project.
Am 27.01.2007 um 17:53 schrieb Martin Peach:
I have implemented a string type for Pure Data as well as a [str] object that uses it. For it to work, pd needs to be patched. The [str] is contained in a separate file but the infrastructural changes are part of pd. I have attached a patch file for anyone interested. If it is acceptable, where should I put it? I could check str.c into externals, but it won't build unless the source is patched... The str object can join, split, load, save, drip, compare and convert strings to other types. It should be useful for formatting arbitrary strings for communication via byte-oriented objects such as [comport] and [tcpserver], which can then talk to external hardware (e.g. serial LCD or lanbox), for example terminating strings with CR LF instead of semicolons. Other potential applications of the string type that I haven't yet implemented are math using very long integers and row-by-row image processing.