This is StringTestSybase.m in view mode; [Download] [Up]
//
// StringTestSybase.m -- test out the String class' Sybase category
// Written by Don Yacktman Copyright (c) 1994 by Don Yacktman.
// Version 1.0. All rights reserved.
//
// This notice may not be removed from this source code.
//
// This program is included in the MiscKit by permission from the author
// and its use is governed by the MiscKit license, found in the file
// "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
// for a list of all applicable permissions and restrictions.
//
#define SYSTRINGS 6
void testMiscStringSybase()
{
int i; id string[SYSTRINGS];
printf("***** Testing MiscStringSybase category\n");
// Test MiscStringSybase.m methods:
string[0] = [MiscString newWithString:""];
string[1] = [MiscString
newWithString:"This* _is_ a? test of% wild*card??s."];
string[2] = [MiscString newWithString:"Case insensitive."];
string[3] = [MiscString newWithString:"(#@!)^&-+=."];
string[4] = [[MiscString alloc] init];
for (i=0; i<SYSTRINGS - 1; i++) {
printf("Before: \"%s\"\n", [string[i] stringValue]);
[string[i] convertUnixWildcardsToSybase];
printf(" wc: \"%s\"\n", [string[i] stringValue]);
[string[i] convertToCaseInsensitiveSearchString];
printf(" ciss: \"%s\"\n", [string[i] stringValue]);
string[SYSTRINGS - 1] = [string[i] makeCaseInsensitiveSearchString];
printf(" nciss: \"%s\"\n\n",
[string[SYSTRINGS - 1] stringValueAndFree]);
[string[i] free];
}
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.