Page 1 of 1

PostPosted: Thu Jun 03, 2004 2:44 pm
by RunningUtes
Hi there,
I was learning how to use "Strip" command and started with the example code included:
Code: Select all
//Example using Strip on spaces
library "PToolboxLib"
main() {
string str = "     this   is  a     test       ";
string tmp;
tmp=str; //copy str into tmp;
Strip(&tmp," ",0x0111); //strip out all whitespace from front & back, and skip middle of string.
Strip(&tmp," ",0x1011); //strip out all whitespace from front & back, and make words separated only by 1 whitespace

This is the output that I got:
Code: Select all
<i>NOTE: quotes were added for this output only</i>
"     this   is  a     test       :End"

Shouldn't the spaces rather then the text be missing? I didn't change the example at all. I am using PToolBox 7.6.1 and PocketC 6.5.1. I understand that the command 0x0011 should also remove ALL the spaces in the string ("thisisatest:End"), right?
Thanks for your help!
-Michael Dansie

PostPosted: Thu Jun 03, 2004 3:23 pm
by jstadolnik
PocketC v6.5 broke many of the PToolboxLib's string and array related functions.

Use the PToolboxLib v7.6.2beta available here: ... _beta.html

It will likely remedy the problem.


The PToolboxLib guy.

PostPosted: Thu Jun 10, 2004 3:58 pm
by RunningUtes
Thanks the new beta version worked great!