* @brief Python-like convenience function, dropping prefix formed of given characters. * @see Similar to `boost::algorithm::trim_left_if(str, is_any_of(set))`. */
| 2500 | * @see Similar to `boost::algorithm::trim_left_if(str, is_any_of(set))`. |
| 2501 | */ |
| 2502 | string_slice lstrip(byteset set) const noexcept { |
| 2503 | set = set.inverted(); |
| 2504 | auto new_start = (pointer)sz_find_byteset(start_, length_, &set.raw()); |
| 2505 | return new_start ? string_slice {new_start, length_ - static_cast<size_type>(new_start - start_)} |
| 2506 | : string_slice(); |
| 2507 | } |
| 2508 | |
| 2509 | /** |
| 2510 | * @brief Python-like convenience function, dropping suffix formed of given characters. |