22#define HD_INC_CORE_STRING_CSTRING_H
33#include " ../character.h"
44
5- // For is_pure_ansi check : https://quick-bench.com/q/P_adhBeQdvHLTBB8EZCtLyrPRsM
5+ // For is_pure_ascii check : https://quick-bench.com/q/P_adhBeQdvHLTBB8EZCtLyrPRsM
66namespace hud
77{
88
@@ -28,14 +28,14 @@ namespace hud
2828 * @param string The null-terminated string
2929 * @return Always return true
3030 */
31- [[nodiscard]] static HD_FORCEINLINE bool is_pure_ansi (const ansichar *string) noexcept
31+ [[nodiscard]] static HD_FORCEINLINE bool is_pure_ascii (const ansichar *string) noexcept
3232 {
3333 if (string == nullptr ) {
3434 return false ;
3535 }
3636
3737 while (!character::is_null (*string)) {
38- if (!character::is_pure_ansi (*string)) {
38+ if (!character::is_pure_ascii (*string)) {
3939 return false ;
4040 }
4141 string++;
@@ -48,14 +48,14 @@ namespace hud
4848 * @param string The null-terminated string
4949 * @return true if the string contains only ansichar, false otherwise
5050 */
51- [[nodiscard]] static bool is_pure_ansi (const wchar *string) noexcept
51+ [[nodiscard]] static bool is_pure_ascii (const wchar *string) noexcept
5252 {
5353 if (string == nullptr ) {
5454 return false ;
5555 }
5656
5757 while (!character::is_null (*string)) {
58- if (!character::is_pure_ansi (*string)) {
58+ if (!character::is_pure_ascii (*string)) {
5959 return false ;
6060 }
6161 string++;
@@ -70,7 +70,7 @@ namespace hud
7070 * @return true if the string contains only ansichar and reach null-terminator character or the string_size character.
7171 * false if the string contains non ansichar character
7272 */
73- [[nodiscard]] static HD_FORCEINLINE bool is_pure_ansi_safe (const ansichar *string, usize string_size) noexcept
73+ [[nodiscard]] static HD_FORCEINLINE bool is_pure_ascii_safe (const ansichar *string, usize string_size) noexcept
7474 {
7575 return string != nullptr ;
7676 }
@@ -82,7 +82,7 @@ namespace hud
8282 * @return true if the string contains only ansichar and reach null-terminator character or the string_size character.
8383 * false if the string contains non ansichar character
8484 */
85- [[nodiscard]] static bool is_pure_ansi_safe (const wchar *string, usize string_size) noexcept
85+ [[nodiscard]] static bool is_pure_ascii_safe (const wchar *string, usize string_size) noexcept
8686 {
8787 if (string == nullptr ) {
8888 return false ;
@@ -93,7 +93,7 @@ namespace hud
9393 if (character::is_null (cur)) {
9494 return true ;
9595 }
96- if (!character::is_pure_ansi (cur)) {
96+ if (!character::is_pure_ascii (cur)) {
9797 return false ;
9898 }
9999 string++;
@@ -849,9 +849,9 @@ namespace hud
849849 const bool max_length_is_zero = max_length == 0 ;
850850 const bool max_length_is_greater_than_RSIZE_MAX_STR = max_length > RSIZE_MAX_STR;
851851 if constexpr (hud::compilation::is_assertion_enabled ()) {
852- hud::debugger::break_here_if (string_is_nullptr);
853- hud::debugger::break_here_if (max_length_is_zero);
854- hud::debugger::break_here_if (max_length_is_greater_than_RSIZE_MAX_STR);
852+ // hud::debugger::break_here_if(string_is_nullptr);
853+ // hud::debugger::break_here_if(max_length_is_zero);
854+ // hud::debugger::break_here_if(max_length_is_greater_than_RSIZE_MAX_STR);
855855 }
856856 // We do not add the max_length_is_greater_than_RSIZE_MAX_STR to condition,
857857 // the value will be clamped to RSIZE_MAX_STR
0 commit comments