Skip to content

Releases: gershnik/sys_string

2.15

07 Jan 09:01
Compare
Choose a tag to compare

This is a bug fix release for 2.x code

Fixed

  • Invalid character access in unicode mappings.

3.0

03 Dec 07:16
Compare
Choose a tag to compare

This is a major release with some breaking changes

Changed

  • C++20 or higher is now required for compilation. In particular, the following C++20 features must be available:
    • Ranges support in standard library (__cpp_lib_ranges >= 201911)
    • Three-way comparison (spaceship operator)
    • char8_t type
    • std::endian support in standard library (__cpp_lib_endian >= 201907)
    • Minimal compilers known to work include: GCC 12, Clang 16, Apple Clang 15.4 and MSVC 17.6.
  • The library has been range-ified.
    • All methods that used to accept iterator pairs now take iterator/sentinel pairs.
    • All these methods now also have overloads that accept ranges
    • Existing informal ranges (sys_string::char_access, sys_string::utf_view, etc.) are now
      formal ranges or views.
    • As part of the above sys_string::utfX_view classes has been renamed to sys_string::utfX_access (because they are
      not formally views as defined by standard library). The old names have been retained for compatibility but annotated
      as deprecated. Note that sys_string_builder::utf_view remains under the same name since it is a view.
    • Breaking change: as part of the above change the sys_string::utf_access and sys_string_builder::utf_view now
      return distinct iterators and sentinels (that is they no longer satisfy std::ranges::common_range concept).
      You will need to use ranges algorithms with their iterators (e.g. std::ranges::for_each rather than std::for_each).
    • The global utf_view template has been split into two: utf_ref_view that takes underlying range by reference (similar
      to std::ref_view) and utf_owning_view that owns a movable underlying range (similar to std::owning_view). These
      are automatically produced by as_utf range adapter closures (see below in Added section)
    • Breaking change: the non-standard Cursor classes has been removed.
  • The library has been concept-ified.
    • Most templated library calls now have concepts checks that validate their argument types.
    • Primitive std::enable_if used before have been subsumed by these and removed.
  • Unicode data used for case folding and whitespace detection has been updated to version 16.0.0

Added

  • sys_string_t can now be +-ed with any forward range of any type of character (including C strings and std::string).
    This results in a the same optimized addition as when adding sys_string_t objects.
  • sys_string_t objects can now be formatted via std::format (if available in your library). On platforms
    where wchar_t is UTF-16 or UTF-32 you can also use wide character formatting.
  • sys_string_t::std_format method. This formats a new sys_string_t (similar to the existing sys_string_t::format)
    but uses std::format machinery and formatting string syntax.
  • Range adapter closures: as_utf8, as_utf18, as_utf32 and generic as_utf<encoding> .
    • These can be used to create utf_ref_view/utf_owning_view from any range/view. For example as_utf16(std::string("abc"))
    • If you library supports custom adapter closures (usually __cpp_lib_ranges >= 202202L) they can be used in
      view pipelines like std::string("abc") | as_utf16 | std::views::take(2) etc.

Fixed

  • Printing sys_string_t objects into std::ostream (and std::wostream if available) now functions correctly in presence
    of stream formatting flags. Flags are currently ignored. This might change in a future version.
  • Printing/formatting sys_string_t objects that use char storage type now does not perform sanitizing transcoding. The content
    of the string is printed as-is. This allows faithful round-tripping and support for invalid Unicode for those scenarios. Similar
    behavior applies to wchar_t on platform where it is UTF-16 or UTF-32.
  • operator<< no longer pollutes global namespace

2.14

03 May 05:13
Compare
Choose a tag to compare

Fixed

  • Missing standard header causing compilation error on some systems.

2.13

19 Nov 07:18
Compare
Choose a tag to compare

Fixed

  • Compilation error with Python strings under Python 3.12
  • Apple CLang compilation errors with XCode 15

2.12

31 Jul 18:08
Compare
Choose a tag to compare

Fixed

  • Fixed CLang compilation errors
  • Fixed CMake installation not producing proper version when run from extracted official archive
  • Fixed various compiler warnings

2.11

24 Jul 19:35
Compare
Choose a tag to compare

Changed

  • Updated CMake configuration to modernize it and allow local installation

2.10

30 Mar 08:38
Compare
Choose a tag to compare
  • Made Python strings work with GCC

2.9

30 Mar 08:37
Compare
Choose a tag to compare
2.9
  • Making Python strings work with PyPy implementation

2.8

18 Mar 16:19
Compare
Choose a tag to compare
2.8
  • Added support for Python strings
  • Updated documentation

2.7

02 Feb 12:18
Compare
Choose a tag to compare
2.7
  • Added support for Emscripten/JavaScript storage and interop. Strings are stored in UTF16 encoding and transformation methods to/from JavaScript are available similar to how Android/Java interop works. Docs to follow.
  • Fixed creation of longer Apple strings
  • Fixed warnings in newer Xcode versions.