Hi Is it possible to split a string into an array of chars? Or work with parts of strings in other ways? src/util_string.h mentions these string related functions: std::string itoa( t_CKINT val ); std::string ftoa( t_CKFLOAT val, t_CKUINT precision ); std::string tolower( const std::string & val ); std::string toupper( const std::string & val ); std::string trim( const std::string & val ); std::string ltrim( const std::string & val ); std::string rtrim( const std::string & val ); I couldn't find some of them (like ltrim) in the manual, although they were mentioned in examples. Shouldn't they be mentioned in the manual? -- Atte http://atte.dk http://modlys.dk
There was a Tokenizer object in the FileIO documentation. I can't seem to
find any reference to it in the latest documentation.
Kassen, Do you know where this has gone?
Mike
http://michaelclemow.com
http://semiotech.org
On Thu, Jul 12, 2012 at 3:13 AM, Atte André Jensen
Hi
Is it possible to split a string into an array of chars? Or work with parts of strings in other ways?
src/util_string.h mentions these string related functions:
std::string itoa( t_CKINT val ); std::string ftoa( t_CKFLOAT val, t_CKUINT precision ); std::string tolower( const std::string & val ); std::string toupper( const std::string & val ); std::string trim( const std::string & val ); std::string ltrim( const std::string & val ); std::string rtrim( const std::string & val );
I couldn't find some of them (like ltrim) in the manual, although they were mentioned in examples. Shouldn't they be mentioned in the manual?
-- Atte
http://atte.dk http://modlys.dk
______________________________**_________________ chuck-users mailing list chuck-users@lists.cs.**princeton.edu
https://lists.cs.princeton.**edu/mailman/listinfo/chuck-**usershttps://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Kassen, Do you know where this has gone?
Right drawer in the kitchen, next to the scissors :-p Actually; the "secret" trick to finding any such feature is the VERSIONS text in the root of your chuck directory. This refers us to the relevant file in examples/string, yielding; ------------------8<----------------------- // the very hacked StringTokenizer // make one StringTokenizer tok; // set the string tok.set( "tokenize me please!" ); // iterate while( tok.more() ) { // print <<< tok.next(), "" >>>; } ----------------------->8------------------ ...however, I seem to remember this "cuts" at spaces, which is not the desired "string to array of characters" functionality. I'm not so sure that's possibe, but I haven't done that much with strings. Yours, Kas.
On 2012-07-12 16:58, Kassen wrote:
Actually; the "secret" trick to finding any such feature is the VERSIONS text in the root of your chuck directory. This refers us to the relevant file in examples/string, yielding;
Thanks, I'll try to remember this. However a mention of all "hidden" capabilities of chuck in the manual, will be good as it will in fact "unhide" the features.
// the very hacked StringTokenizer ...however, I seem to remember this "cuts" at spaces, which is not the desired "string to array of characters" functionality.
Indeed it cuts at spaces, which is unfortunately not what I need :-( But thanks for the info! -- Atte http://atte.dk http://modlys.dk
participants (3)
-
Atte André Jensen
-
Kassen
-
mike clemow