Vision Messages: String

| Home | String Class | Message XRef | Messages (General) |

Profile of Class String


Includes Classes: Ordinal, String



Object
  | 
Ordinal
  | 
  +--- String


The instances of class String are objects that represent sequences of characters. The representation of a string is a sequence of characters delimited by double quotes. Unlike selectors, strings need not be unique. Any character may be included in a string. If a double quote is to be included, it must be preceded by the escape character .


Message Index

o != aString
o < aNumber (Ordinal)
o < aString (String)
o <= aNumber (Ordinal)
o <= aString (String)
o = aString
o > aNumber (Ordinal)
o > aString (String)
o >= aNumber (Ordinal)
o >= aString (String)
o LowerCaseDictionary
o UpperCaseDictionary
o __asOpenVisionChannel
o additionUpdateDumpOf:
o appendOutputOf: aBlock
o as: type
o asBlock
o asBlockIn: object
o asCSVRecords
o asCells
o asCellsOn: delimiter
o asCurrency
o asDate
o asFileContents
o asInteger
o asLines
o asNumber
o asOpenVisionChannel
o asOpenVisionChannelToVision
o asQuotedString
o asRecords
o asSelector
o asSelf (Ordinal)
o asSelf (String)
o asString
o asUpperLowerWords
o asWords
o at: n
o at: n put: object
o basicConcat:
o basicContains:
o basicDrop:
o basicFill:
o basicFindPatternExtent:
o basicFindPatternOrigin:
o basicFindSubstringOrigin:
o basicTake:
o between: anOrdinal1 and: anOrdinal2
o breakOn: aCharacterSet
o breakString: aString
o canonicalizedForSort
o capitalize
o cbreakOn: aCharacterSet
o cbreakString: aString
o center: anInteger
o centerNL: anInteger
o classDescriptor (Ordinal)
o classDescriptor (String)
o concat: aString
o contains: aString
o containsSubstring: substring
o convertFrom: string
o convertToNumber
o count
o defaultInstance (Ordinal)
o defaultInstance (String)
o deleteFromDictionaryOf: anObject
o drop: aNumber
o evaluate
o evaluateIn: anObject
o evaluateWithCompilationErrorHandler:in:
o fill: aNumber
o filterOutputOf: aBlock
o findPatternExtent: pattern
o findPatternOrigin: pattern
o findPatternSuffix: pattern
o findSubstringExtent: substring
o findSubstringOrigin: substring
o findSubstringSuffix: substring
o fixed
o formatForExcel
o formatForPRN
o from: pos
o from: pos1 for: count
o from: pos1 to: pos2
o howManyOf: charset
o Ordinal inRange: aList
o inSet: aList
o isBlank
o isBlankFor: aNumber
o isDefault
o isOrdinal
o isString
o locateInDictionaryOf: anObject
o locateOrAddInDictionaryOf: anObject
o lowercase
o matchesString: aString
o max: aNumber
o min: aNumber
o new
o notBetween: anOrdinal1 and: anOrdinal2
o notifyAsComment
o notifyAsError
o notifyAsWarning
o orderUsingDictionary: dictionary
o pad: aNumber
o patternExtentIn: string
o patternOriginIn: string
o prefixNotSpannedBy: aString
o prefixNotSpannedIn: aString
o prefixSpannedBy: aString
o prefixSpannedIn: aString
o prefixWith: aString
o print
o print: anInteger
o printPRN
o printPRN: anInteger
o putStringTo:
o replacementUpdateDumpOf:
o reverse
o sprint: anInteger
o startingPositionOf: subString
o startingPositionsOf: subString
o stripBoundingBlanks
o stripChar: char
o stripCommas
o stripLeadingBlanks
o stripTrailingBlanks
o substituteOutputOf: aBlock
o substringOriginIn: string
o take: anInteger
o to: pos
o toDouble
o toList
o toLower
o toUpper
o translate: charSet to: string
o translateString: fromString to: toString
o unixFileContents
o whatAmI (Ordinal)
o whatAmI (String)


Messages

o !=

Synopsis:
String != aString

Description:

Tests if recipient string is the same as the supplied string.

Type: Method          Returns: Boolean

Also Defined At:
| Date | Number | Object |

o <

Synopsis:
Ordinal < aNumber

Description:

Tests if recipient is smaller than supplied value. Each subclass of Ordinal must redefine this message. If a subclass does not implement <, then an attempt to send the message to a subclass results in an error message of the form: >>> '<' must be implemented for 'recipient' <<<.

Type: Method          Returns: Boolean

Parameters:

1 - Number

Also Defined At:
| Date | Object | String | Undefined |

o <

Synopsis:
String < aString

Description:

Tests if recipient string comes before supplied string alphabetically.

Type: Primitive          Returns: Boolean

Parameters:

1 - String

Also Defined At:
| Date | Object | Undefined |

o <=

Synopsis:
Ordinal <= aNumber

Description:

Tests if recipient is smaller than or equal to supplied value.

Type: Method          Returns: Boolean

Parameters:

1 - Number

Also Defined At:
| Date | Object | String | Undefined |

o <=

Synopsis:
String <= aString

Description:

Tests if recipient string comes before or is equal to supplied string.

Type: Primitive          Returns: Boolean

Parameters:

1 - String

Also Defined At:
| Date | Object | Undefined |

o =

Synopsis:
String = aString

Description:

Tests if supplied string contains the identical sequence as the recipient String. Two strings are NOT identical if one has extra blanks at the beginning or end. Upper and lower case letters are NOT identical.

Type: Primitive          Returns: Boolean

Parameters:

1 - String

Also Defined At:
| Date | DateRange | Object |

o >

Synopsis:
Ordinal > aNumber

Description:

Tests if recipient is larger than supplied value.

Type: Method          Returns: Boolean

Parameters:

1 - Number

Also Defined At:
| Date | Number | Object | String | Undefined |

o >

Synopsis:
String > aString

Description:

Tests if recipient String comes after supplied String alphabetically.

Type: Method          Returns: Boolean

Parameters:

1 - String

Also Defined At:
| Date | Number | Object | Undefined |

o >=

Synopsis:
Ordinal >= aNumber

Description:

Tests if recipient is larger than or equal to supplied value.

Type: Method          Returns: Boolean

Parameters:

1 - Number

Also Defined At:
| Date | Number | Object | String | Undefined |

o >=

Synopsis:
String >= aString

Description:

Tests if recipient String is the same or comes after supplied String alphabetically.

Type: Method          Returns: Boolean

Parameters:

1 - String

Also Defined At:
| Date | Number | Object | Undefined |

o LowerCaseDictionary

Synopsis:
String LowerCaseDictionary

Description:

Upper to lower case conversion chart.

Type: Constant          Returns: Dictionary

o UpperCaseDictionary

Synopsis:
String UpperCaseDictionary

Description:

Lower to upper case conversion chart.

Type: Constant          Returns: Dictionary

o __asOpenVisionChannel

Synopsis:
String __asOpenVisionChannel

Type: Primitive          Returns: Object

o additionUpdateDumpOf:

Synopsis:
String additionUpdateDumpOf:

Description:

For Internal Use Only.

Type: Primitive          Returns: Object

Parameters:

1 - Undefined

o appendOutputOf:

Synopsis:
String appendOutputOf: aBlock

Description:

Appends all print statement that are invoked directly or indirectly within the supplied block to the Unix file; the recipient string represents the Unix filename.

Type: Primitive          Returns: Object

Parameters:

1 - Block

o as:

Synopsis:
String as: type

Description:

Converts the recipient String to an instance of the class indicated by the parameter, if possible. If the type is a string that is not the default String, the supplied type will be evaluated to determine its class. The implementation of 'convertFrom:' defined for that class will be used to convert the string to the correct class. The version at Object looks the string up in the class' default naming dictionary if it exists. If the recipient String contains the ',' character, this method returns a list of objects of the supplied type. Any String that cannot be converted to the supplied class returns NA.

Type: Method          Returns: Object

Also Defined At:
| Undefined |

o asBlock

Synopsis:
String asBlock

Description:

Converts recipient into a Block that contains the recipient.

Type: Method          Returns: Block

o asBlockIn:

Synopsis:
String asBlockIn: object

Description:

Converts recipient into a Block that contains the recipient. The block is created in the execution environment of the suplied object.

Type: Method          Returns: Block

o asCSVRecords

Synopsis:
String asCSVRecords

Description:

Converts a comma-separated-value format file to a list of strings,
with each element responding to the message 'fields', which returns
a list of the comma-separted values. Embedded commas in the original
file are preserved. For example, if the file 'sample.dat' contains:
key1, description1, value1
key2, "description 2 with , character", value2
then:
"sample.dat" asCSVRecords
do: [ "Field 1: " print ; fields at: 1 . printNL ;
"Field 2: " print ; fields at: 2 . printNL ;
"Field 3: " print ; fields at: 3 . printNL ;
] ;

displays:

Field 1: key1
Field 2: description1
Field 3: value1
Field 1: key2
Field 2: description 2 with , character
Field 3: value2

Type: Method          Returns: List

o asCells

Synopsis:
String asCells

Description:

Converts the recipient string into a list of strings extended by the 'cells' message which returns a list of strings generated using the tab or Vision delimiter. Lines containing Vision Formatter commands (i.e., @@@) are removed as are any cells that contain an escape character.

Type: Method          Returns: List

o asCellsOn:

Synopsis:
String asCellsOn: delimiter

Description:

Converts the recipient string into a list of strings extended by the 'cells' message which returns a list of strings generated using supplied delimiter. Lines containing Vision Formatter commands (i.e., @@@) are removed as are any cells that contain an escape character.

Type: Method          Returns: List

Parameters:

1 - String

o asCurrency

Synopsis:
String asCurrency

Description:

Converts recipient into a Currency.

Type: Method          Returns: Currency

Also Defined At:
| Currency | Undefined |

o asDate

Synopsis:
String asDate

Description:

Converts the recipient String into a Date object. The recipient
can contain a value in one of the following forms:
"yy", "yymm", "yymmdd", "yyyymmdd"
"m/d/y" where m is 1-12; d is 1-31; y is yy or yyyy
"m-d-y" where m is 1-12; d is 1-31; y is yy or yyyy
"+ # offset", where # is integer and offset is a DateOffset
"- # offset", where # is integer and offset is a DateOffset
"today"
"yesterday"

The 'offset' formats add/subtract the offset from the current value of '^date'.
For example:
"961231" asDate --> 12/31/96
"1/3/95" asDate --> 1/3/95
"+ 3 days" --> current date + 3 days
"today" --> today's date

Type: Method          Returns: Date

Also Defined At:
| Date | DateOffset | Number | Undefined |

o asFileContents

Synopsis:
String asFileContents

Description:

Converts the file name specified by the recipient string into a String containing the file's contents. If the file is not found, an empty string is returned.

Type: Method          Returns: String

o asInteger

Synopsis:
String asInteger

Description:

Converts recipient into a Number of class Integer.

Type: Method          Returns: Integer

Also Defined At:
| Date | DateOffset | Undefined |

o asLines

Synopsis:
String asLines

Description:

Returns a list of strings based on carriage returns in recipient string.

Type: Method          Returns: List

o asNumber

Synopsis:
String asNumber

Description:

Converts recipient string into a number. Strings containing numbers with no decimal point are converted to integers. Strings containing non-numeric characters are converted to NA.

Type: Method          Returns: Number

Also Defined At:
| Undefined |

o asOpenVisionChannel

Synopsis:
String asOpenVisionChannel

Type: Method          Returns: Object

o asOpenVisionChannelToVision

Synopsis:
String asOpenVisionChannelToVision

Type: Method          Returns: Object

o asQuotedString

Synopsis:
String asQuotedString

Description:

Returns the recipient string enclosed in double quotes.

Type: Method          Returns: String

o asRecords

Synopsis:
String asRecords

Description:

Converts the file specified in the recipient string into a list of strings, with each element representing a record in the original file. Empty lines are excluded from the returned list.

Type: Method          Returns: List

o asSelector

Synopsis:
String asSelector

Description:

Returns the recipient as a selector object. The version at Selector returns recipient.

Type: Method          Returns: Selector

o asSelf

Synopsis:
Ordinal asSelf

Description:

Returns the original object.

Type: Primitive          Returns: Ordinal

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o asSelf

Synopsis:
String asSelf

Description:

Returns the original object.

Type: Primitive          Returns: String

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | TimeSeries | Undefined | Utility |

o asString

Synopsis:
String asString

Description:

Returns recipient string stripped of any extensions.

Type: Primitive          Returns: String

Also Defined At:
| Object |

o asUpperLowerWords

Synopsis:
String asUpperLowerWords

Description:

Returns a list of strings based on upper case letter word boundaries.

Type: Method          Returns: List

o asWords

Synopsis:
String asWords

Description:

Returns a list of strings representing the individual words in the recipient string where a word is terminated by a blank, tab or new line character.

Type: Method          Returns: List

o at:

Synopsis:
String at: n

Description:

Returns the character at the specified position. For example:

"abcdefghij" at: 3 .

returns the single character string "c".

Type: Method          Returns: String

Parameters:

1 - Integer

Also Defined At:
| Dictionary | List |

o at:put:

Synopsis:
String at: n put: object

Description:

Inserts the supplied string at the supplied character position. For
example:

"abcdefghij" at: 3 put: "xyz"

returns the string "abxyzcdefghij".

Type: Method          Returns: String

Parameters:

1 - Integer
2 - String

Also Defined At:
| Dictionary | List |

o basicConcat:

Synopsis:
String basicConcat:

Type: Primitive          Returns: Object

o basicContains:

Synopsis:
String basicContains:

Type: Primitive          Returns: Object

o basicDrop:

Synopsis:
String basicDrop:

Type: Primitive          Returns: Object

o basicFill:

Synopsis:
String basicFill:

Type: Primitive          Returns: Object

o basicFindPatternExtent:

Synopsis:
String basicFindPatternExtent:

Type: Primitive          Returns: Object

o basicFindPatternOrigin:

Synopsis:
String basicFindPatternOrigin:

Type: Primitive          Returns: Object

o basicFindSubstringOrigin:

Synopsis:
String basicFindSubstringOrigin:

Type: Primitive          Returns: Object

o basicTake:

Synopsis:
String basicTake:

Type: Primitive          Returns: Object

o between:and:

Synopsis:
Ordinal between: anOrdinal1 and: anOrdinal2

Description:

Tests if recipient Ordinal is between supplied Ordinal1 and supplied Ordinal2

Type: Method          Returns: Boolean

Parameters:

1 - String
2 - String

Also Defined At:
| Undefined |

o breakOn:

Synopsis:
String breakOn: aCharacterSet

Description:

Breaks the recipient string into a list using the characters in the string parameter as break points. The break point characters are not included in the resultant list elements. For example, the expression: myString breakOn: newLine can be used to return a list of strings corresponding to the 'records' in the recipient string.

Type: Primitive          Returns: List

Parameters:

1 - String

o breakString:

Synopsis:
String breakString: aString

Description:

For Internal Use Only.

Type: Method          Returns: Object

Parameters:

1 - String

o canonicalizedForSort

Synopsis:
String canonicalizedForSort

Description:

For Internal Use Only.

Type: Primitive          Returns: Object

Also Defined At:
| Object |

o capitalize

Synopsis:
String capitalize

Description:

Capitalizes the first letter of the string.

Type: Method          Returns: String

o cbreakOn:

Synopsis:
String cbreakOn: aCharacterSet

Description:

Breaks the recipient string into a list using the characters NOT in the string parameter as break points. The break point characters are not included in the resultant list elements. This message is the converse of 'breakOn:'.

Type: Primitive          Returns: List

Parameters:

1 - String

o cbreakString:

Synopsis:
String cbreakString: aString

Description:

For Internal Use Only.

Type: Method          Returns: Object

Parameters:

1 - String

o center:

Synopsis:
String center: anInteger

Description:

Centers the recipient string in specified width. If string contains more characters than supplied width, it is truncated to fit and no centering is performed.

Type: Method          Returns: String

Parameters:

1 - Integer

o centerNL:

Synopsis:
String centerNL: anInteger

Description:

Centers the recipient String using the supplied width and then starts a new line.

Type: Method          Returns: String

Parameters:

1 - Integer

o classDescriptor

Synopsis:
Ordinal classDescriptor

Description:

Reference to the object which describes the class. Class level information is stored here.

Type: Constant          Returns: Object

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o classDescriptor

Synopsis:
String classDescriptor

Description:

Reference to the object which describes the class. Class level information is stored here.

Type: Constant          Returns: Object

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | TimeSeries | Undefined | Utility |

o concat:

Synopsis:
String concat: aString

Description:

Appends supplied string to the end of the recipient string.

Type: Method          Returns: String

Parameters:

1 - String

o contains:

Synopsis:
String contains: aString

Description:

Tests if the supplied string is included in the recipient string.

Type: Method          Returns: Boolean

Parameters:

1 - String

Also Defined At:
| Undefined |

o containsSubstring:

Synopsis:
String containsSubstring: substring

Description:

This message returns TRUE if substring is found in the recipient. Unlike
the 'contains:' message, this form matches each character literally, so
no wildcard characters are recognized. For example,

"abc" contains: "^a"

returns TRUE, but

"abc" containsSubstring: "^a"

returns FALSE.

Type: Method          Returns: Boolean

Parameters:

1 - String

o convertFrom:

Synopsis:
String convertFrom: string

Description:

This message converts the supplied string to an instance of the recipient's class if applicable, returning NA otherwise. The definition at Object will lookup the string in the class' naming dictionary, if defined. The version at String returns the recipient stripped of any extensions. The versions at Number, Integer, Double, and Float convert the recipient to a numeric value if possible. The version at Date converts the recipient to a Date using the 'asDate' message defined at String. The version at Boolean returns TRUE if the recipient contains an upper/lower case combination of 'true' and FALSE if the recipient contains an upper/lower case combination of 'false'. The version at block returns a block containing the string as a message. This message is called by the 'as:' message at String.

Type: Method          Returns: Object

Also Defined At:
| Block | Boolean | Date | Number | Object | Undefined |

o convertToNumber

Synopsis:
String convertToNumber

Description:

Removes any non-numeric characters (0-9 . - +) from the start and end of the string and any commas from within the remaining string. If the resultant string can be converted by a number it is, otherwise NA is returned.

Type: Method          Returns: Number

o count

Synopsis:
String count

Description:

Counts the number of characters in recipient string. Returns a non-negative integer.

Type: Primitive          Returns: Integer

Also Defined At:
| IndexedList | List | TimeSeries |

o defaultInstance

Synopsis:
Ordinal defaultInstance

Description:

Returns the default instance of the recipient object's class

Type: Constant          Returns: Ordinal

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o defaultInstance

Synopsis:
String defaultInstance

Description:

Returns the default instance of the recipient object's class

Type: Constant          Returns: String

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | OpenVision | Schema | TimeSeries | Undefined | Utility |

o deleteFromDictionaryOf:

Synopsis:
String deleteFromDictionaryOf: anObject

Description:

Converts the recipient string to a selector and removes the protocol implemented by it from the dictionary associated with the supplied object.

Type: Primitive          Returns: Object

Parameters:

1 - Object

o drop:

Synopsis:
String drop: aNumber

Description:

Drops the specified number of characters form the beginning or end of recipient string. A positive integer drops characters starting at the beginning of the string. A negative number drops characters starting at the end of the string. If you drop more characters that the string contains, a string with 0 characters is returned.

Type: Method          Returns: String

Parameters:

1 - Number

o evaluate

Synopsis:
String evaluate

Description:

Executes string as VISION expression at ^global.

Type: Method          Returns: Object

o evaluateIn:

Synopsis:
String evaluateIn: anObject

Description:

Executes string as VISION expression in supplied environment.

Type: Method          Returns: Object

Parameters:

1 - Object

o evaluateWithCompilationErrorHandler:in:

Synopsis:
String evaluateWithCompilationErrorHandler:in:

Type: Primitive          Returns: Object

Parameters:

1 - Undefined
2 - Undefined

o fill:

Synopsis:
String fill: aNumber

Description:

Repeats the characters in the original string until a string of the specified length is formed. A negative number repeats the pattern from right to left.

Type: Method          Returns: String

Parameters:

1 - Number

o filterOutputOf:

Synopsis:
String filterOutputOf: aBlock

Description:

Supplies the printed output associated with the execution of the
supplied block as input to the recipient string as a Unix Command.

For example:

"format" filterOutputOf: [ Named Company IBM displayReport ]

will redirect the report through the format program as standard input
(i.e., format < report). By default, the results of executing this
expression will be printed on your screen.

Type: Primitive          Returns: Object

Parameters:

1 - Block

o findPatternExtent:

Synopsis:
String findPatternExtent: pattern

Description:

Returns the length of the pattern if it is present in the recipient. If it is not present, zero is returned. This version views the pattern as a regular expression (i.e., wildcards are interpretted).

Type: Method          Returns: Boolean

Parameters:

1 - String

o findPatternOrigin:

Synopsis:
String findPatternOrigin: pattern

Description:

Returns the zero-based position of the first occurrence of the pattern in the recipient. If the string is not found, the length of the recipient is returned. This version views the pattern as a regular expression (i.e., wildcards are interpretted).

Type: Method          Returns: Boolean

Parameters:

1 - String

o findPatternSuffix:

Synopsis:
String findPatternSuffix: pattern

Description:

Returns the zero-based position of the first character after the first occurrence of the pattern in the recipient. If the string is not found, the length of the recipient is returned. This version views the pattern as a regular expression (i.e., wildcards are interpretted).

Type: Method          Returns: Boolean

Parameters:

1 - String

o findSubstringExtent:

Synopsis:
String findSubstringExtent: substring

Description:

Returns the length of the sub-string if it is present in the recipient. If the string is not prsent, zero is returned. This version matches the characters in the sub-string explicitly.

Type: Method          Returns: Boolean

Parameters:

1 - String

o findSubstringOrigin:

Synopsis:
String findSubstringOrigin: substring

Description:

Returns the zero-based position of the first occurrence of the sub-string in the recipient. If the string is not found, the length of the recipient is returned. This version matches the characters in the sub-string explicitly.

Type: Method          Returns: Boolean

Parameters:

1 - String

o findSubstringSuffix:

Synopsis:
String findSubstringSuffix: substring

Description:

Returns the zero-based position of the first character after the first occurrence of the sub-string in the recipient. If the string is not found, the length of the recipient is returned. This version matches the characters in the sub-string explicitly.

Type: Method          Returns: Boolean

Parameters:

1 - String

o fixed

Synopsis:
String fixed

Description:

For Internal Use Only.

Type: Primitive          Returns: Object

o formatForExcel

Synopsis:
String formatForExcel

Description:

reformats the recipient string for use as tab delimited output. This message assumes that the recipient string is delimited by the tab or Vision delimiter.

Type: Method          Returns: String

Also Defined At:
| Block |

o formatForPRN

Synopsis:
String formatForPRN

Description:

reformats the recipient string for use as PRN-style input Strings are printed in quotes, numbers are printed as is, and field are separated by a space. This message assumes that the recipient string is delimited by the tab or Vision delimiter.

Type: Method          Returns: String

Also Defined At:
| Block |

o from:

Synopsis:
String from: pos

Description:

Returns a substring of recipient starting from position indicated by parameter. If 'pos' is numeric, the substring starting with this character position to the end of the string is returned. If 'pos' is a character, the substring starting from the first occurrence of this character to the end of the string is returned.

Type: Method          Returns: String

Parameters:

1 - Ordinal

Also Defined At:
| TimeSeries |

o from:for:

Synopsis:
String from: pos1 for: count

Description:

Returns a substring of the recipient object from the supplied position for count characters. If count is positive, supplied position is the first position of the returned string. If count is negative, supplied position is the last position of the returned string.

Type: Method          Returns: String

Parameters:

1 - Integer
2 - Integer

o from:to:

Synopsis:
String from: pos1 to: pos2

Description:

Returns a substring of the recipient object from the starting position to the ending position. The supplied parameters should be positive integers. If pos1 is greater than pos2, the resultant string is reversed.

Type: Method          Returns: String

Parameters:

1 - Integer
2 - Integer

Also Defined At:
| TimeSeries |

o howManyOf:

Synopsis:
String howManyOf: charset

Description:

Returns the number of occurrences of any of the characters in the supplied
character set in the recipient String. For example:
"1/15/96" howManyOf: "/" . printNL ;

Type: Method          Returns: Integer

Parameters:

1 - String

o inRange:

Synopsis:
Ordinal Ordinal inRange: aList

Description:

Tests if recipient Ordinal is in range specified by aList, where aList contains 2 elements - the start and end of the range (inclusive).

Type: Method          Returns: Boolean

Parameters:

1 - String

o inSet:

Synopsis:
Ordinal inSet: aList

Description:

Tests if recipient Ordinal is included in supplied list.

Type: Method          Returns: Boolean

Parameters:

1 - String

o isBlank

Synopsis:
String isBlank

Description:

Returns TRUE if string is all blanks.

Type: Method          Returns: Boolean

o isBlankFor:

Synopsis:
String isBlankFor: aNumber

Description:

Returns TRUE if string is blank for first n characters.

Type: Method          Returns: Boolean

Parameters:

1 - Number

o isDefault

Synopsis:
String isDefault

Description:

Returns TRUE if string is empty.

Type: Method          Returns: Boolean

Also Defined At:
| Collection | Date | Object | Undefined |

o isOrdinal

Synopsis:
Ordinal isOrdinal

Description:

Returns a TRUE value when sent to any Ordinal.

Type: Constant          Returns: TRUE

Also Defined At:
| Object |

o isString

Synopsis:
String isString

Description:

Returns a TRUE value when sent to any String.

Type: Constant          Returns: TRUE

Also Defined At:
| Object |

o locateInDictionaryOf:

Synopsis:
String locateInDictionaryOf: anObject

Description:

Converts the recipient string into a selector and returns the intensional form of the value assessed in the dictionary of the supplied object. Send the 'value' message to evaluate the object returned.

Type: Primitive          Returns: Object

Parameters:

1 - Object

o locateOrAddInDictionaryOf:

Synopsis:
String locateOrAddInDictionaryOf: anObject

Description:

Converts the recipient string into a selector and looks up this selector in the supplied object's dictionary, returning the intensional form of the value if present. Otherwise the selector is added to the dictionary and the intensional form is returned. Send 'value' message to intensional form to evaluate it.

Type: Primitive          Returns: Object

Parameters:

1 - Object

o lowercase

Synopsis:
String lowercase

Description:

Converts the first letter of a string to lowercase.

Type: Method          Returns: String

o matchesString:

Synopsis:
String matchesString: aString

Description:

Tests whether supplied string is identical to recipient string.

Type: Method          Returns: Boolean

Parameters:

1 - String

Also Defined At:
| Undefined |

o max:

Synopsis:
Ordinal max: aNumber

Description:

Computes the larger of the supplied value and the recipient Number. If an invalid parameter is supplied, NA is returned.

Type: Method          Returns: Number

Parameters:

1 - Number

Also Defined At:
| Collection | Undefined |

o min:

Synopsis:
Ordinal min: aNumber

Description:

Computes the smaller of the supplied value and the recipient Number. If an invalid parameter is supplied, NA is returned.

Type: Method          Returns: Number

Parameters:

1 - Number

Also Defined At:
| Collection | Undefined |

o new

Synopsis:
Ordinal new

Description:

Undefines the 'new' message for Ordinal classes.

Type: Method          Returns: Ordinal

Also Defined At:
| Boolean | Collection | DateRange | Dictionary | Object | Undefined |

o notBetween:and:

Synopsis:
Ordinal notBetween: anOrdinal1 and: anOrdinal2

Description:

Tests if recipient Ordinal is not between supplied Ordinal1 and supplied Ordinal2.

Type: Method          Returns: Boolean

Parameters:

1 - String
2 - String

Also Defined At:
| Undefined |

o notifyAsComment

Synopsis:
String notifyAsComment

Description:

Obsolete.

Type: Method          Returns: Object

o notifyAsError

Synopsis:
String notifyAsError

Description:

Obsolete.

Type: Method          Returns: Object

o notifyAsWarning

Synopsis:
String notifyAsWarning

Description:

Obsolete.

Type: Method          Returns: Object

o orderUsingDictionary:

Synopsis:
String orderUsingDictionary: dictionary

Description:

For Internal Use Only.

Type: Method          Returns: Object

Parameters:

1 - Undefined

Also Defined At:
| Object |

o pad:

Synopsis:
String pad: aNumber

Description:

Pads the string with blanks if number of characters in the string is less than supplied parameter. If 'n' is negative, string is padded on the left; otherwise, it is padded on the right.

Type: Method          Returns: String

Parameters:

1 - Number

o patternExtentIn:

Synopsis:
String patternExtentIn: string

Type: Method          Returns: Object

o patternOriginIn:

Synopsis:
String patternOriginIn: string

Type: Method          Returns: Object

o prefixNotSpannedBy:

Synopsis:
String prefixNotSpannedBy: aString

Description:

This message returns the number of characters at the beginning of the recipient string that do not match any character in the supplied string.

Type: Primitive          Returns: Integer

Parameters:

1 - String

o prefixNotSpannedIn:

Synopsis:
String prefixNotSpannedIn: aString

Description:

For Internal Use Only.

Type: Method          Returns: Object

Parameters:

1 - String

o prefixSpannedBy:

Synopsis:
String prefixSpannedBy: aString

Description:

This message returns the number of characters at the beginning of the recipient string that match any character in the supplied string

Type: Primitive          Returns: Integer

Parameters:

1 - String

o prefixSpannedIn:

Synopsis:
String prefixSpannedIn: aString

Description:

For Internal Use Only.

Type: Method          Returns: Object

Parameters:

1 - String

o prefixWith:

Synopsis:
String prefixWith: aString

Description:

For Internal Use Only.

Type: Method          Returns: Object

Parameters:

1 - Undefined

o print

Synopsis:
String print

Description:

Redefines the standard print message so that the content of the string is printed. All characters are printed; no truncation or padding occurs. Strings can contain the carraige return character.

Type: Primitive          Returns: String

Also Defined At:
| Block | Date | DateOffset | DateRange | Entity | IndexedList | List | Object | TimeSeries | Undefined |

o print:

Synopsis:
String print: anInteger

Description:

Prints the string using the supplied width. Strings containing fewer characters than the supplied width are padded with the appropriate number of blanks on the right (i.e., left-justified). If the supplied width is negative, the string will be padded with the blanks on the left (right- justified). If the string contains more characters than the width supplied, the rightmost characters will be removed.

Type: Method          Returns: String

Parameters:

1 - Integer

Also Defined At:
| Boolean | Date | Entity | Number | Object | Undefined |

o printPRN

Synopsis:
String printPRN

Description:

Prints the recipient string using 'prn' format. The recipient is printed surrounded by quotes.

Type: Method          Returns: String

Also Defined At:
| Object |

o printPRN:

Synopsis:
String printPRN: anInteger

Description:

Prints the recipient object in 'prn' format using the supplied width. The output string is surrounded by quotes.

Type: Method          Returns: String

Parameters:

1 - Integer

Also Defined At:
| Object |

o putStringTo:

Synopsis:
String putStringTo:

Type: Primitive          Returns: Object

o replacementUpdateDumpOf:

Synopsis:
String replacementUpdateDumpOf:

Description:

For Internal Use Only.

Type: Primitive          Returns: Object

Parameters:

1 - Undefined

o reverse

Synopsis:
String reverse

Description:

Returns the recipient string with each character in reverse order.

Type: Primitive          Returns: String

o sprint:

Synopsis:
String sprint: anInteger

Description:

Returns the recipient string in a new string formatted to the number of characters specified in supplied width

Type: Method          Returns: String

Parameters:

1 - Integer

Also Defined At:
| Number | Object | Undefined |

o startingPositionOf:

Synopsis:
String startingPositionOf: subString

Description:

Returns the position number at which the first occurence of the supplied substring starts in the recipient string.

Type: Method          Returns: Integer

o startingPositionsOf:

Synopsis:
String startingPositionsOf: subString

Description:

Returns the list of position numbers at which the supplied substring starts in the recipient string.

Type: Method          Returns: List

o stripBoundingBlanks

Synopsis:
String stripBoundingBlanks

Description:

Returns the string stripped of blanks on either side.

Type: Method          Returns: String

o stripChar:

Synopsis:
String stripChar: char

Description:

Returns the recipient string with the supplied character removed for every occurrence

Type: Method          Returns: String

Parameters:

1 - String

o stripCommas

Synopsis:
String stripCommas

Description:

Returns the string stripped of any commas.

Type: Method          Returns: String

o stripLeadingBlanks

Synopsis:
String stripLeadingBlanks

Description:

Returns the string stripped of any leading blanks.

Type: Method          Returns: String

o stripTrailingBlanks

Synopsis:
String stripTrailingBlanks

Description:

Returns the string stripped of any blanks that follow the last character.

Type: Method          Returns: String

o substituteOutputOf:

Synopsis:
String substituteOutputOf: aBlock

Description:

Creates a Unix file containing all print statement that are invoked directly or indirectly within the supplied block; the recipient string represents the Unix filename

Type: Primitive          Returns: Object

Parameters:

1 - Block

o substringOriginIn:

Synopsis:
String substringOriginIn: string

Type: Method          Returns: Object

o take:

Synopsis:
String take: anInteger

Description:

Keeps the specified number of characters from the beginning or end of the string. A positive number keeps characters starting at the beginning of the string. A negative number keeps characters starting at the end of the string. If you keep more characters than the string contains, blanks will be added to the beginning or end of the string.

Type: Method          Returns: String

Parameters:

1 - Integer

o to:

Synopsis:
String to: pos

Description:

Returns a substring of recipient from start of recipient to position indicated by parameter. If 'pos' is numeric, the substring ending with this character position is returned. If 'pos' is a character, the substring starting from the beginning of the recipient through to the first occurrence of this character is returned.

Type: Method          Returns: String

Parameters:

1 - Ordinal

Also Defined At:
| TimeSeries |

o toDouble

Synopsis:
String toDouble

Description:

Converts recipient string to a double precision number if possible. If recipient does not contian a valid number, NA is returned.

Type: Primitive          Returns: Double

o toList

Synopsis:
String toList

Description:

Converts recipient string to a list of characters. The resultant list has one element for each character in the recipient string.

Type: Method          Returns: List

Also Defined At:
| IndexedList | List | TimeSeries |

o toLower

Synopsis:
String toLower

Description:

Converts the characters in the recipient string to lower case letters and returns a single string.

Type: Method          Returns: String

o toUpper

Synopsis:
String toUpper

Description:

Converts the characters in the recipient string to upper case letters and returns a single string.

Type: Method          Returns: String

o translate:to:

Synopsis:
String translate: charSet to: string

Description:

Replaces all occurrences of any character in the string supplied as the first parameter with the string supplied a the second parameter. This differs from the 'translateString:to:' message which replaces all occurrences of the first string with the second string.

Type: Method          Returns: String

Parameters:

1 - String
2 - String

o translateString:to:

Synopsis:
String translateString: fromString to: toString

Description:

Replaces all occurrences of the 'fromString' with 'toString'. Note that this differs from the 'translate:to:' message which replaces any character in the first parameter with the string supplied as the second parameter. Note that this version returns NA when the translation encounters overlapping replacments.

Type: Method          Returns: String

Parameters:

1 - String
2 - String

o unixFileContents

Synopsis:
String unixFileContents

Type: Method          Returns: Object

o whatAmI

Synopsis:
Ordinal whatAmI

Description:

Returns the string 'Ordinal'.

Type: Constant          Returns: String

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o whatAmI

Synopsis:
String whatAmI

Description:

Returns the string 'String'.

Type: Constant          Returns: String

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | TimeSeries | Undefined | Utility |