diff --git a/crates/typst-library/src/foundations/str.rs b/crates/typst-library/src/foundations/str.rs index 5a939fdba..8ac99ac63 100644 --- a/crates/typst-library/src/foundations/str.rs +++ b/crates/typst-library/src/foundations/str.rs @@ -575,6 +575,11 @@ impl Str { /// Splits a string at matches of a specified pattern and returns an array /// 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] pub fn split( &self,