forked from M-Labs/nac3
lyken
cf34002179
Achieved through defining all the needed Exception ID constants at link time. Secondly, since `Exception` is `size_t` dependent, `__nac3_raise()` takes an opaque pointer to `Exception`.
20 lines
280 B
C++
20 lines
280 B
C++
#pragma once
|
|
|
|
#include <irrt/int_types.hpp>
|
|
|
|
namespace cstr
|
|
{
|
|
/**
|
|
* @brief Implementation of `strlen()`.
|
|
*/
|
|
uint32_t length(const char *str)
|
|
{
|
|
uint32_t length = 0;
|
|
while (*str != '\0')
|
|
{
|
|
length++;
|
|
str++;
|
|
}
|
|
return length;
|
|
}
|
|
} // namespace cstr
|