Useful API Functions: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Cg (Diskussion | Beiträge) |
Cg (Diskussion | Beiträge) |
||
Zeile 18: | Zeile 18: | ||
'hello world' copyFrom:6. |
'hello world' copyFrom:6. |
||
=> ' world' |
=> ' world' |
||
===== copyTo: ===== |
|||
''aString'' <code>copyTo:''endIndex''' |
|||
Example: |
|||
'hello world' copyTo:6. |
|||
=> 'hello ' |
Version vom 27. Juli 2019, 14:19 Uhr
Inhaltsverzeichnis
String[Bearbeiten]
Copying[Bearbeiten]
Notice: except when written otherwise, all indices are 1-based. Valid indices range from 1 to the string's size.
copyFrom:to:[Bearbeiten]
aString copyFrom:startIndex to:endIndex
Example:
'hello world' copyFrom:1 to:5.
=> 'hello'
copyFrom:[Bearbeiten]
aString copyFrom:startIndex'
Example:
'hello world' copyFrom:6.
=> ' world'
copyTo:[Bearbeiten]
aString copyTo:endIndex'
Example:
'hello world' copyTo:6.
=> 'hello '