mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Document result of splitting string with empty string as separator (#5572)
This commit is contained in:
parent
c3334a55fe
commit
6953685358
@ -575,6 +575,11 @@ impl Str {
|
|||||||
|
|
||||||
/// Splits a string at matches of a specified pattern and returns an array
|
/// Splits a string at matches of a specified pattern and returns an array
|
||||||
/// of the resulting parts.
|
/// of the resulting parts.
|
||||||
|
///
|
||||||
|
/// When the empty string is used as a separator, it separates every
|
||||||
|
/// character in the string, along with the beginning and end of the
|
||||||
|
/// string. In practice, this means that the resulting list of parts
|
||||||
|
/// will contain the empty string at the start and end of the list.
|
||||||
#[func]
|
#[func]
|
||||||
pub fn split(
|
pub fn split(
|
||||||
&self,
|
&self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user