substring

created by byped
(idea) by byped (5.3 y) (print)   ?   (I like it!) Thu Mar 28 2002 at 3:22:46

In programming terms, a substring is some smaller part of a string. Any API worth its beans will give you functions to do this, although the implementation may vary. I've seen some that take two numbers specifying the index of the string to start and end from, ie:

String name = "Billy Bob Thorton";
name = name.substr(6,8);
//name == "Bob"

I've also seen it done by giving two arguments, one being the starting point for the substring, and the other being the length, ie:

String name = "Bily Bob Thorton";
name = name.substr(6,3);
//name == "Bob"
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.