- Use BLI_str_replace_range to avoid a temporary string copy. - Also add a buffer size argument to BLI_path_frame_range.