• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Controlling Text > Manipulating Strings

Manipulating Strings

When you define a text box as Input Text, you give your viewers the freedom to enter and edit information. You've seen how this information can then be used in expressions with other actions, or concatenated and displayed in dynamic text boxes. However, it's often necessary to analyze the text entered by the viewer before using it. You may want to tease out certain words, or identify the location of a particular character or sequence of characters. For example, if you require viewers to enter an e-mail address in an input field, you can check to see if that address is in the correct format by looking for the @ symbol. Or you could check a customer's telephone number, find out the area code based on the first three digits, and personalize a directory or news listing with local interests.

This kind of parsing, manipulation, and control of the information within an input text box is done with a combination of the Selection object and the String object. The Selection object lets you control which text box is currently selected and the position of the cursor within that text box. The String object lets you retrieve and change the properties of the information inside the text box.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint