Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

What do ofTrim(), ofTrimBack() and ofTrimFront() do?

$
0
0

@cuinjune wrote:

Hi, I wonder what they do.
I tried passing a string to these functions but I don’t see any change to the string.

Here’s my sample code:

string str = "  hello world  ";
cout << strlen(str.c_str()) << endl;
ofTrim(str);
cout << strlen(str.c_str()) << endl;

And here’s the result I get:

15
15

What do these functions do?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles