Skip to content

Commit 55cd484

Browse files
committed
Update docs for .slice() feature
1 parent 52a0b53 commit 55cd484

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

website/docs/language/types.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ Members:
6565

6666
- `length`: Number of characters in the string.
6767
- `split(int)`: Splits the string at the specified index and returns a tuple with the two resulting strings.
68+
- `slice(int,int)`: Returns a substring from the start index up to (but excluding) the end index.
6869
- `reverse()`: Reverses the string.
6970

7071
:::caution
71-
The script will fail if `split()` is called with an index that is out of bounds.
72+
The script will fail if `split()`or `slice()` is called with an index that is out of bounds.
7273
:::
7374

7475
## Bytes
@@ -89,10 +90,11 @@ Members:
8990

9091
- `length`: Number of bytes in the sequence.
9192
- `split(int)`: Splits the byte sequence at the specified index and returns a tuple with the two resulting byte sequences.
93+
- `slice(int,int)`: Returns the part of the byte sequence from the start index up to (but excluding) the end index.
9294
- `reverse()`: Reverses the byte sequence.
9395

9496
:::caution
95-
The script will fail if `split()` is called with an index that is out of bounds.
97+
The script will fail if `split()` or `slice()` is called with an index that is out of bounds.
9698
:::
9799

98100
#### Example

website/docs/releases/release-notes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Release Notes
44

55
## v0.11.3
66

7+
#### cashc compiler
8+
- :sparkles: Add `.slice(start, end)` operator for bytes and strings.
9+
710
#### CashScript SDK
811
- :bug: Fix bug with where `ElectrumNetworkProvider` would disconnect in browser on visibility change of the page
912

0 commit comments

Comments
 (0)