mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
text: add splitText method
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
@@ -513,6 +513,12 @@ pub fn textWholdeText(text: *Text) []const u8 {
|
||||
return stringToData(s.?);
|
||||
}
|
||||
|
||||
pub fn textSplitText(text: *Text, offset: u32) *Text {
|
||||
var res: ?*Text = undefined;
|
||||
_ = textVtable(text).dom_text_split_text.?(text, offset, &res);
|
||||
return res.?;
|
||||
}
|
||||
|
||||
// Comment
|
||||
pub const Comment = c.dom_comment;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user