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