Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 5.1

FEATURE

The StringUtils Module

Filling the Gaps in REALbasic's String Support

Issue: 5.1 (September/October 2006)
Author: Joe Strout
Author Bio: Joe Strout is founder and CEO of Verified Express, which aims to replace e-mail with something better -- using servers running software written entirely in REALbasic.
Article Description: No description available.
Article Length (in bytes): 22,754
Starting Page Number: 29
Article Number: 5112
Related Web Link(s):

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

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.