From 66f66a363641d210c516ee725be7eb5690ed03ea Mon Sep 17 00:00:00 2001 From: Edward Nolan Date: Sat, 1 Nov 2025 17:36:24 -1000 Subject: [PATCH] Consistent Title Case --- paper/P2728.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/paper/P2728.md b/paper/P2728.md index 16c3acd..80c9f55 100644 --- a/paper/P2728.md +++ b/paper/P2728.md @@ -314,7 +314,7 @@ You can also substitute a different replacement character by changing the result of the `else` clause, or add exception-based error handling by throwing at that point. -### Why there are three `to_utfN_view`s and no `to_utf_view` +### Why There Are Three `to_utfN_view`s and No `to_utf_view` The views in `std::ranges` are constrained to accept only `std::ranges::view` template parameters. However, they accept `std::ranges::viewable_range`s in @@ -367,14 +367,14 @@ an exposition-only transformation functor that performs the needed cast. # Additional Examples -## Transcoding a UTF-8 string literal to a `std::u32string` +## Transcoding a UTF-8 String Literal to a `std::u32string` ```cpp std::u32string hello_world = u8"こんにちは世界" | std::views::to_utf32 | std::ranges::to(); ``` -## Sanitizing potentially invalid Unicode +## Sanitizing Potentially Invalid Unicode Note that transcoding to and from the same encoding is not a no-op; it must maintain the invariant that the output of a transcoding view is always valid @@ -387,7 +387,7 @@ std::basic_string sanitize(CharT const* str) { } ``` -## Returning the final non-ASCII code point in a string, transcoding backwards lazily: +## Returning the Final Non-ASCII Code Point in a String, Transcoding Backwards Lazily: ```cpp std::optional last_nonascii(std::ranges::view auto str) { @@ -399,7 +399,7 @@ std::optional last_nonascii(std::ranges::view auto str) { } ``` -## Transcoding strings and throwing a descriptive exception on invalid UTF +## Transcoding Strings and Throwing a Descriptive Exception on Invalid UTF (This assumes a reflection-based `enum_to_string` function.) @@ -427,7 +427,7 @@ std::basic_string transcode_or_throw(std::basic_string_view in u8"hi🙂" | std::views::take(5) | std::ranges::to()); ``` -## Changing the suits of Unicode playing card characters: +## Changing the Suits of Unicode Playing Card Characters: ```cpp enum class suit : std::uint8_t { @@ -481,7 +481,7 @@ Both libraries have comprehensive tests. # Wording -## Additional helper concepts +## Additional Helper Concepts Add the following to [range.utility.helpers]{.sref}: