I think it is a bad idea to return the string 'error ... ' when no string found. it has to return an empty string
example
stack_var char status1[5]
stack_var char status2[5]
status1 = 'status-error-endstatus';
status2 = 'hello, world!';
status1 = string_get_between(status1, 'status-', '-endstatus');
status2 = string_get_between(status2, 'status-', '-endstatus');
in this case status1 and status2 are both contain the string 'error' and this is wrong
solution: string_size_error() function has to return an empty string