From the course: Processing: Interactive Data Visualization

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Modifying strings

Modifying strings - Processing Tutorial

From the course: Processing: Interactive Data Visualization

Start my 1-month free trial

Modifying strings

In the previous movie we learned how to enter string data either manually by typing it into the sketch or by importing the text file. If you want to be able to work with strings, Processing has a wide array of functions. I'm going to demonstrate a few of them to you here. But you should know that there is a lot more that's available, specifically in terms of searching for functions and that one uses Regular Expressions. In fact, if you're interested in learning more about Regular Expressions, you should see Lynda.com's course on that topic specifically. It would come in particularly useful for working with string data in data visualization. What I want to show you now is just two functions. One is on trimming empty space from the beginning and end of strings and another one is for converting numbers into strings. I'm going to start by simply putting the name of this file up here as a comment. And then I'm going to first demonstrate the trim function. And the way this works, is you…

Contents