ftp.nice.ch/pub/next/developer/resources/classes/misckit/MiscKit.1.10.0.s.gnutar.gz#/MiscKit/Headers/misckit/MiscStringCompatability.h

This is MiscStringCompatability.h in view mode; [Download] [Up]

//
//	MiscString.h -- a generic class to simplify manipulation of (char *)'s
//		Written by Don Yacktman Copyright (c) 1993, 1994 by Don Yacktman.
//				Version 1.95.  All rights reserved.
//		This notice may not be removed from this source code.
//
//	This object 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.
//	

// These methods make a MiscString easier to use when moving from some
// other string class to the MiscString.  All these methods are simply
// covers for the real MiscString method, so you should not use any of
// these in a new program.  Look for the _real_ MiscString method and
// use it instead.  Avoid these methods as any or all of them could
// disappear at any time in the future!

#ifndef _HEADER_VIEWER_

@interface MiscString(Compat)

// Compatability method; do not use this in a new program:
- takeStringValue:sender;
// Compatability method; do not use this in a new program:
- clear;
// Compatability method; do not use this in a new program:
- (const char *)string;
// Compatability method; do not use this in a new program:
- setString:(const char *)aString;
// Compatability method; do not use this in a new program:
- replaceChar:(char)aChar withChar:(char)replaceChar;
// Compatability method; do not use this in a new program:
- addToEndOfString:(const char *)aString;
// Compatability method; do not use this in a new program:
- addToFrontOfString:(const char *)aString;
// Compatability method; do not use this in a new program:
- addCharToEndOfString:(char)aChar;
// Compatability method; do not use this in a new program:
- addCharToFrontOfString:(char)aChar;
// Compatability method; do not use this in a new program:
- (int)numberFields;
// Compatability method; do not use this in a new program:
- (char *)nthField:(int)fieldNumber useAsDelimiter:(char)c;
// Compatability method; do not use this in a new program:
- (char *)nthField:(int)fieldNumber;
// Compatability method; do not use this in a new program:
- (char *)nthQuotedField:(int)fieldNumber;
// Compatability method; do not use this in a new program:
- (char *)lastField;
// Compatability method; do not use this in a new program:
- (char *)firstField;
// Compatability method; do not use this in a new program:
- addStrings:(const char *)fields,  ...;
// Compatability method; do not use this in a new program:
- replaceEveryInstanceOfChar:(char)aChar withChar:(char)replaceChar;
// Compatability method; do not use this in a new program:
- replaceEveryInstanceOfChar:(char)aChar with:(char)replaceChar;

// MOString compatability
// Compatability method; do not use this in a new program:
- convertToUpper;
// Compatability method; do not use this in a new program:
- convertToLower;
// Compatability method; do not use this in a new program:
- (int)replaceAllOccurrencesOfChar:(char)oldChar with:(char)newChar;
// Compatability method; do not use this in a new program:
- (char)replaceCharAt:(int)index with:(char)newChar;
// Compatability method; do not use this in a new program:
- insertStringValue:(const char *)s at:(int)position;
// Compatability method; do not use this in a new program:
- preCatStringValue:(const char *)s;
// Compatability method; do not use this in a new program:
- preCat:stringObject;
// Compatability method; do not use this in a new program:
- preCatFromFormat:(const char *)format, ...;
// Compatability method; do not use this in a new program:
- catStringValue:(const char *)s;
// Compatability method; do not use this in a new program:
- (int)compare:stringObject caseSensitive:(BOOL)flag;
// Compatability method; do not use this in a new program:
- (int)compare:stringObject caseSensitive:(BOOL)flag length:(int)length;
// Compatability method; do not use this in a new program:
- (int)compare:stringObject caseSensitive:(BOOL)flag length:(int)length 
			withTable:(NXStringOrderTable *)table;
// Compatability method; do not use this in a new program:
- (int)compareStr:(const char *)s;
// Compatability method; do not use this in a new program:
- (int)compareStr:(const char *)s caseSensitive:(BOOL)flag;
// Compatability method; do not use this in a new program:
- (int)compareStr:(const char *)s caseSensitive:(BOOL)flag length:(int)length;
// Compatability method; do not use this in a new program:
- (int)compareStr:(const char *)s caseSensitive:(BOOL)flag length:(int)length
			withTable:(NXStringOrderTable *)table;
// Compatability method; do not use this in a new program:
- (int)endCompare:stringObject caseSensitive:(BOOL)flag;
// Compatability method; do not use this in a new program:
- (int)endCompare:stringObject caseSensitive:(BOOL)flag length:(int)length;
// Compatability method; do not use this in a new program:
- (int)endCompare:stringObject caseSensitive:(BOOL)flag length:(int)length 
			withTable:(NXStringOrderTable *)table;
// Compatability method; do not use this in a new program:
- (int)endCompareStr:(const char *)s;
// Compatability method; do not use this in a new program:
- (int)endCompareStr:(const char *)s caseSensitive:(BOOL)flag;
// Compatability method; do not use this in a new program:
- (int)endCompareStr:(const char *)s caseSensitive:(BOOL)flag 
			length:(int)length;
// Compatability method; do not use this in a new program:
- (int)endCompareStr:(const char *)s caseSensitive:(BOOL)flag 
			length:(int)length withTable:(NXStringOrderTable *)table;
// Compatability method; do not use this in a new program:
- substringFrom:(int)start to:(int)end;
// Compatability method; do not use this in a new program:
- (int)positionOf:(char)aChar nthOccurrence:(int)n;
// Compatability method; do not use this in a new program:
- (int)countOccurrencesOf:(char)aChar;
// Compatability method; do not use this in a new program:
- (size_t)strlen;
// Compatability method; do not use this in a new program:
- (const char *)strcpy:(const char *)s;
// Compatability method; do not use this in a new program:
- (const char *)strncpy:(const char *)s :(size_t)n;
// Compatability method; do not use this in a new program:
- (const char *)strcat:(const char *)s;
// Compatability method; do not use this in a new program:
- (const char *)strncat:(const char *)s :(size_t)n;
// Compatability method; do not use this in a new program:
- (int)strcmp:(const char *)s;
// Compatability method; do not use this in a new program:
- (int)strncmp:(const char *)s :(size_t)n;
// Compatability method; do not use this in a new program:
- (const char *)strchr:(char)aChar;
// Compatability method; do not use this in a new program:
- (const char *)strrchr:(char)aChar;
// Compatability method; do not use this in a new program:
- (const char *)strpbrk:(const char *)breakChars;
// Compatability method; do not use this in a new program:
- (size_t)strspn:(const char *)acceptableChars;
// Compatability method; do not use this in a new program:
- (size_t)strcspn:(const char *)breakChars;
// Compatability method; do not use this in a new program:
- initStringValue:(const char *)s;
// Compatability method; do not use this in a new program:
- initStringValueNoCopy:(char *)s; // the const is how it should be
// Compatability method; do not use this in a new program:
- initStringValueNoCopy:(char *)s shouldFree:(BOOL)flag;
// Compatability method; do not use this in a new program:
- initStringValueUnique:(const char *)s;
// Compatability method; do not use this in a new program:
- deepCopy;
// Compatability method; do not use this in a new program:
- deepCopyFromZone:(NXZone *)zone;
// Compatability method; do not use this in a new program:
- shallowCopy;
// Compatability method; do not use this in a new program:
- shallowCopyFromZone:(NXZone *)zone;
// Compatability method; do not use this in a new program:
- setStringValueNoCopy:(const char *)s; // the const is how it should be
// Compatability method; do not use this in a new program:
- setStringValueNoCopy:(char *)s shouldFree:(BOOL)flag;
// Compatability method; do not use this in a new program:
- setStringValueUnique:(const char *)s;
// Compatability method; do not use this in a new program:
- setNull;
// Compatability method; do not use this in a new program:
- makeUnique;
// Compatability method; do not use this in a new program:
- setShouldFree:(BOOL)flag;
// Compatability method; do not use this in a new program:
- (unsigned int)count;
// Compatability method; do not use this in a new program:
- (BOOL)isNull;
// Compatability method; do not use this in a new program:
- (BOOL)isEmpty;
// Compatability method; do not use this in a new program:
- (BOOL)isUnique;
// Compatability method; do not use this in a new program:
- (BOOL)shouldFree;

// MOPathString extras
// Compatability method; do not use this in a new program:
- (int)numberOfComponents;
// Compatability method; do not use this in a new program:
- componentAt:(int)index;
// Compatability method; do not use this in a new program:
- file;
// Compatability method; do not use this in a new program:
- directory; // warning:  conflicts with NeXT headers:  id vs. (const char *)
// Compatability method; do not use this in a new program:
- (const char *)path;
// Compatability method; do not use this in a new program:
- (BOOL)isRelative;
// Compatability method; do not use this in a new program:
- (BOOL)isAbsolute;
// Compatability method; do not use this in a new program:
- (BOOL)isDirectory;
// Compatability method; do not use this in a new program:
- (BOOL)isPlainFile;
// Compatability method; do not use this in a new program:
- (BOOL)isSymbolicLink;
// Compatability method; do not use this in a new program:
- (BOOL)isCharacterSpecial;
// Compatability method; do not use this in a new program:
- (BOOL)isBlockSpecial;
// Compatability method; do not use this in a new program:
- (BOOL)isSocket;
// Compatability method; do not use this in a new program:
- setPathSeparator:(char)c; // NO OP.
					// Use a cast to avoid conflicts w/NXBrowser method.
// Compatability method; do not use this in a new program:
- setExtensionSeparator:(char)c; // NO OP
// Compatability method; do not use this in a new program:
- (char)pathSeparator;
// Compatability method; do not use this in a new program:
- (char)extensionSeparator;
// Compatability method; do not use this in a new program:
- setPath:(const char *)path;
// Compatability method; do not use this in a new program:
- initPath:(const char *)path;
// Compatability method; do not use this in a new program:
- (char *)buffer; // don't free this return value!!!
// Compatability method; do not use this in a new program:
-(BOOL) streq:(char*)thestr;

// NSString emulations.  First two courtesy of Scott Anguish:
- (BOOL)hasPrefix:(const char *)value;
- (BOOL)hasPrefixString:value;

@end

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.