From 0576bccce71e441abb4f950e574d584d40859d8a Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Sun, 13 Aug 2000 05:35:16 +0000 Subject: [PATCH] String documentation added for raplacing strings with strings git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7196 72102866-910b-0410-8b05-ffd578937521 --- Documentation/gsdoc/NSMutableString.gsdoc | 14 +++++ Documentation/gsdoc/NSMutableString.html | 16 +++++- Documentation/gsdoc/NSString.gsdoc | 39 +++++++++++++ Documentation/gsdoc/NSString.html | 68 +++++++++++++++++------ 4 files changed, 119 insertions(+), 18 deletions(-) diff --git a/Documentation/gsdoc/NSMutableString.gsdoc b/Documentation/gsdoc/NSMutableString.gsdoc index 4e160e67d..7d6d6223f 100644 --- a/Documentation/gsdoc/NSMutableString.gsdoc +++ b/Documentation/gsdoc/NSMutableString.gsdoc @@ -62,6 +62,20 @@ + + replaceString: + aString + withString: + replacement + + Replaces any (and all) occurrances of aString in the + receiver by replacement. + Has no effect if aString does not occur within the + receiver. NB. an empty string is not considered to exist within + the receiver. + + + setString: aString diff --git a/Documentation/gsdoc/NSMutableString.html b/Documentation/gsdoc/NSMutableString.html index b71b17e2c..7e3d71383 100644 --- a/Documentation/gsdoc/NSMutableString.html +++ b/Documentation/gsdoc/NSMutableString.html @@ -30,7 +30,8 @@
  • -initWithCapacity:
  • -insertString:
  • -replaceCharactersInRange:withString: -
  • -setString: +
  • -replaceString:withString: +
  • -setString:

    stringWithCapacity:

    @@ -68,7 +69,18 @@
    -

    setString:

    +

    replaceString:withString:

    +- (void) replaceString: (NSString*)aString withString: (NSString*)replacement;
    +Standards: GNUstep NotMacOS-X NotOpenStep
    + + Replaces any (and all) occurrances of aString in the + receiver by replacement. + Has no effect if aString does not occur within the + receiver. NB. an empty string is not considered to exist within + the receiver. + +
    +

    setString:

    - (void) setString: (NSString*)aString;
    diff --git a/Documentation/gsdoc/NSString.gsdoc b/Documentation/gsdoc/NSString.gsdoc index db032f237..185e68d8e 100644 --- a/Documentation/gsdoc/NSString.gsdoc +++ b/Documentation/gsdoc/NSString.gsdoc @@ -479,12 +479,18 @@ rangeOfString: aString + Invokes rangeOfString:options: with the options mask + set to zero. rangeOfString: aString + options: + mask + Invokes rangeOfString:options:range with the range set + set to the range of the whole of the reciever. @@ -495,6 +501,25 @@ range: aRange + Returns the range giving the location and length of the first + occurrence of subString within aRange. +
    + If subString does not exist in the receiver (an empty + string is never considered to exist in the receiver), + the length of the returned range is zero. +
    + If substring is nil, an exception is raised. +
    + If any part of aRange lies outside the range of the + receiver, an exception is raised. +
    + The optionsm mask may contain the following options - + + NSCaseInsensitiveSearch + NSLiteralSearch + NSBackwardsSearch + NSAnchoredSearch +
    @@ -546,6 +571,20 @@ + + stringByReplacingString: + aString + withString: + replacement + + Returns a string in which any (and all) occurrances of + aString in the receiver have been replaced by + replacement. Returns the receiver if aString + does not occur within the receiver. NB. an empty string is + not considered to exist within the receiver. + + + stringsByAppendingPaths: paths diff --git a/Documentation/gsdoc/NSString.html b/Documentation/gsdoc/NSString.html index a0776bd91..7311d75a0 100644 --- a/Documentation/gsdoc/NSString.html +++ b/Documentation/gsdoc/NSString.html @@ -43,8 +43,8 @@ A constant NSString can be created using the following syntax: @"..."+localizedStringWithFormat:
  • +pathWithComponents:
  • +string -
  • +stringWithCString:
  • +stringWithCString: +
  • +stringWithCString:
  • +stringWithCharacters:length:
  • +stringWithContentsOfFile:
  • +stringWithFormat: @@ -106,7 +106,7 @@ A constant NSString can be created using the following syntax: @"..."-rangeOfCharacterFromSet:options:range:
  • -rangeOfComposedCharacterSequenceAtIndex:
  • -rangeOfString: -
  • -rangeOfString: +
  • -rangeOfString:options:
  • -rangeOfString:options:range:
  • -smallestEncoding
  • -stringByAbbreviatingWithTildeInPath @@ -117,12 +117,13 @@ A constant NSString can be created using the following syntax: @"..."-stringByDeletingLastPathComponent
  • -stringByDeletingPathExtension
  • -stringByExpandingTildeInPath -
  • -stringsByAppendingPaths: -
  • -substringFromIndex: -
  • -substringToIndex: -
  • -substringWithRange: -
  • -uppercaseString -
  • -writeToFile:atomically: +
  • -stringByReplacingString:withString: +
  • -stringsByAppendingPaths: +
  • -substringFromIndex: +
  • -substringToIndex: +
  • -substringWithRange: +
  • -uppercaseString +
  • -writeToFile:atomically:

    availableStringEncodings

    @@ -487,16 +488,40 @@ Returns the localized name of the encoding specified by encoding.

    rangeOfString:

    - (NSRange) rangeOfString: (NSString*)aString;
    + Invokes rangeOfString:options: with the options mask + set to zero.
    -

    rangeOfString:

    -- (NSRange) rangeOfString: (NSString*)aString;
    +

    rangeOfString:options:

    +- (NSRange) rangeOfString: (NSString*)aString options: (unsigned int)mask;
    + Invokes rangeOfString:options:range with the range set + set to the range of the whole of the reciever.

    rangeOfString:options:range:

    - (NSRange) rangeOfString: (NSString*)subString options: (unsigned int)mask range: (NSRange)aRange;
    + Returns the range giving the location and length of the first + occurrence of subString within aRange. +
    + If subString does not exist in the receiver (an empty + string is never considered to exist in the receiver), + the length of the returned range is zero. +
    + If substring is nil, an exception is raised. +
    + If any part of aRange lies outside the range of the + receiver, an exception is raised. +
    + The optionsm mask may contain the following options - +
      +
    • NSCaseInsensitiveSearch +
    • NSLiteralSearch +
    • NSBackwardsSearch +
    • NSAnchoredSearch +
    +

    smallestEncoding

    @@ -544,32 +569,43 @@ Returns the localized name of the encoding specified by encoding.


    -

    stringsByAppendingPaths:

    +

    stringByReplacingString:withString:

    +- (NSString*) stringByReplacingString: (NSString*)aString withString: (NSString*)replacement;
    +Standards: GNUstep NotMacOS-X NotOpenStep
    + + Returns a string in which any (and all) occurrances of + aString in the receiver have been replaced by + replacement. Returns the receiver if aString + does not occur within the receiver. NB. an empty string is + not considered to exist within the receiver. + +
    +

    stringsByAppendingPaths:

    - (NSArray*) stringsByAppendingPaths: (NSArray*)paths;

    -

    substringFromIndex:

    +

    substringFromIndex:

    - (NSString*) substringFromIndex: (unsigned int)anIndex;

    -

    substringToIndex:

    +

    substringToIndex:

    - (NSString*) substringToIndex: (unsigned int)anIndex;

    -

    substringWithRange:

    +

    substringWithRange:

    - (NSString*) substringWithRange: (NSRange)aRange;

    -

    uppercaseString

    +

    uppercaseString

    - (NSString*) uppercaseString;

    -

    writeToFile:atomically:

    +

    writeToFile:atomically:

    - (BOOL) writeToFile: (NSString*)path atomically: (BOOL)flag;