local function __TS__StringPosition(position, length)
    if position ~= position then
        return 0
    end
    if position >= length then
        return length
    end
    if position <= -length then
        return -length
    end
    return position >= 0 and math.floor(position) or math.ceil(position)
end
