CharacterArray.st
changeset 1396 5b5386311dbd
parent 1393 7afc79a4cc11
child 1411 a3b3ab3044c6
equal deleted inserted replaced
1395:f324be2221e3 1396:5b5386311dbd
  2179      This is nonStandard, but convenient"
  2179      This is nonStandard, but convenient"
  2180 
  2180 
  2181     aStringOrCharacter isCharacter ifTrue:[
  2181     aStringOrCharacter isCharacter ifTrue:[
  2182         ^ self , aStringOrCharacter asString
  2182         ^ self , aStringOrCharacter asString
  2183     ].
  2183     ].
       
  2184     aStringOrCharacter isText ifTrue:[
       
  2185         ^ aStringOrCharacter concatenateFromString:self
       
  2186     ].
  2184     ^ super , aStringOrCharacter
  2187     ^ super , aStringOrCharacter
  2185 
  2188 
  2186     "
  2189     "
  2187      'hello' , $1    
  2190      'hello' , $1    
  2188      'hello' , '1'   
  2191      'hello' , '1'   
  2189     "
  2192     "
  2190 
  2193 
  2191     "Modified: 29.2.1996 / 20:37:36 / cg"
  2194     "Modified: 14.5.1996 / 15:27:54 / cg"
  2192 !
  2195 !
  2193 
  2196 
  2194 concatenate:string1 and:string2
  2197 concatenate:string1 and:string2
  2195     "return the concatenation of myself and the arguments, string1 and string2.
  2198     "return the concatenation of myself and the arguments, string1 and string2.
  2196      This is equivalent to self , string1 , string2
  2199      This is equivalent to self , string1 , string2
  2230     "Created: 12.5.1996 / 12:28:40 / cg"
  2233     "Created: 12.5.1996 / 12:28:40 / cg"
  2231 ! !
  2234 ! !
  2232 
  2235 
  2233 !CharacterArray methodsFor:'emphasis'!
  2236 !CharacterArray methodsFor:'emphasis'!
  2234 
  2237 
       
  2238 emphasis
       
  2239     "return the emphasis.
       
  2240      Since characterArrays do not hold any emphasis information,
       
  2241      nil (no emphasis) is returned here."
       
  2242 
       
  2243     ^ RunArray new:self size withAll:nil
       
  2244 
       
  2245     "Created: 14.5.1996 / 13:58:58 / cg"
       
  2246 !
       
  2247 
  2235 emphasisAt:characterIndex
  2248 emphasisAt:characterIndex
  2236     "return the emphasis at some index.
  2249     "return the emphasis at some index.
  2237      Since characterArrays do not hold any emphasis information,
  2250      Since characterArrays do not hold any emphasis information,
  2238      nil (no emphasis) is returned here."
  2251      nil (no emphasis) is returned here."
  2239 
  2252 
  2240     ^ nil
  2253     ^ nil
  2241 
  2254 
  2242     "Created: 11.5.1996 / 14:13:27 / cg"
  2255     "Created: 11.5.1996 / 14:13:27 / cg"
       
  2256 !
       
  2257 
       
  2258 emphasisCollection
       
  2259     "return the emphasis.
       
  2260      Since characterArrays do not hold any emphasis information,
       
  2261      nil (no emphasis) is returned here."
       
  2262 
       
  2263     ^ RunArray new:(self size)
       
  2264 
       
  2265     "Created: 14.5.1996 / 13:58:58 / cg"
       
  2266     "Modified: 14.5.1996 / 15:02:29 / cg"
  2243 ! !
  2267 ! !
  2244 
  2268 
  2245 !CharacterArray methodsFor:'encoding/decoding'!
  2269 !CharacterArray methodsFor:'encoding/decoding'!
  2246 
  2270 
  2247 decodeFrom:encodingSymbol
  2271 decodeFrom:encodingSymbol
  3838 ! !
  3862 ! !
  3839 
  3863 
  3840 !CharacterArray class methodsFor:'documentation'!
  3864 !CharacterArray class methodsFor:'documentation'!
  3841 
  3865 
  3842 version
  3866 version
  3843     ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.86 1996-05-14 10:33:05 cg Exp $'
  3867     ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.87 1996-05-14 14:39:08 cg Exp $'
  3844 ! !
  3868 ! !