Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Article Preview


Buy Now

Print:
PDF:

Feature

The StringUtils Module

Filling the Gaps in REALbasic's String Support

Issue: 5.1 (September/October 2006)
Author: Joe Strout
Article Description: No description available.
Article Length (in bytes): 15,959
Starting Page Number: 29
RBD Number: 5112
Resource File(s): None
Related Web Link(s):

<http://www.verex.com/opensource/>

Known Limitations: None

Excerpt of article text...

REALbasic's string handling is, in some ways, quite sophisticated: it handles combinations of text encodings quite gracefully, for example, and does fancy lexicographic comparisons by default. But the actual string operations -- Left, Mid, and InStr for example -- are few, and rather crude. Many other development environments, such as Python, have a much larger toolkit of string functions right out of the box. How many experienced programmers have come to REALbasic, and found themselves asking, "Hey, where are all the string functions?"

Well, here they are! StringUtils is an extensive module of add-on string functions, all in the public domain and free for use in any project, commercial or otherwise. The module can be simply dropped into your projects, and whatever functions you use will be included in your built app; the rest will be stripped out by the linker. Some of the functions are quite complex; others are trivial, but make your code easier to read.

Overview

You can download the latest copy of the StringUtils module from <http://www.verex.com/opensource/>. It comes as a Zip file, which should unpack to a project (StringUtilsHarness.rbp) and an XML file (StringUtils.xml). The project is a test harness, which runs a number of unit tests on each and every function in the module. If all goes well, you won't see much when you run the project, except a message saying the unit tests have completed. But if any unit tests fail (which should only occur if you've been tinkering with the code!), then an error message will appear, and you can use the debugger to see what has failed.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com