-
Notifications
You must be signed in to change notification settings - Fork 0
String_width_ext_line_count
hpgDesigns edited this page Aug 8, 2021
·
1 revision
NOTOC
Returns the number of lines in a multiline string. w is the width of the text in pixels. Lines that are longer than this width are split up at spaces. Use -1 to not split up lines.
- string: The string for which the line count should be returned.
- w: Width of the text in pixels. Lines that are longer than this width are split up at spaces. Use -1 to not split up lines.
Returns the line count of the multiline string.
str = "Some text that is quite long and keeps on going";
draw_text_ext(10,10,str,-1,150);
draw_text(170,10,"The string on the left has "+string(string_width_ext_line_count(str,150))+" lines.");This is number 1