-
Jonathan Schöbel authored
The function SH_Text_get_range returns a string begining at start and ending at end. Note that end specifies the char, that is not returned anymore. Thus the function implements something similar, as the pythonic slice syntax (text[start:end]). In opposition to the behaviour there, calling SH_Text_get_range with start > end is undefined behaviour. If start == end, the empty string is returned. If start is out of bounds, NULL is returned and an error is set. If end is out of bounds, the existent part is returned. Also the length of the returned string can be set (optionally) to the out parameter length.
Jonathan Schöbel authoredThe function SH_Text_get_range returns a string begining at start and ending at end. Note that end specifies the char, that is not returned anymore. Thus the function implements something similar, as the pythonic slice syntax (text[start:end]). In opposition to the behaviour there, calling SH_Text_get_range with start > end is undefined behaviour. If start == end, the empty string is returned. If start is out of bounds, NULL is returned and an error is set. If end is out of bounds, the existent part is returned. Also the length of the returned string can be set (optionally) to the out parameter length.