mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-13 22:47:15 -04:00
Refactor TSTL headers
This commit is contained in:
parent
9cfa4e2d01
commit
1c64a15342
25
tstl/include/cstring.hpp
Normal file
25
tstl/include/cstring.hpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
//=======================================================================
|
||||||
|
// Copyright Baptiste Wicht 2013-2018.
|
||||||
|
// Distributed under the terms of the MIT License.
|
||||||
|
// (See accompanying file LICENSE or copy at
|
||||||
|
// http://www.opensource.org/licenses/MIT)
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
#ifndef CSTRING_H
|
||||||
|
#define CSTRING_H
|
||||||
|
|
||||||
|
#include <types.hpp>
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
|
||||||
|
inline uint64_t str_len(const char* a){
|
||||||
|
uint64_t length = 0;
|
||||||
|
while(*a++){
|
||||||
|
++length;
|
||||||
|
}
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
} //end of namespace std
|
||||||
|
|
||||||
|
#endif
|
@ -8,6 +8,7 @@
|
|||||||
#ifndef STRING_H
|
#ifndef STRING_H
|
||||||
#define STRING_H
|
#define STRING_H
|
||||||
|
|
||||||
|
#include <cstring.hpp>
|
||||||
#include <string_view.hpp>
|
#include <string_view.hpp>
|
||||||
#include <types.hpp>
|
#include <types.hpp>
|
||||||
#include <algorithms.hpp>
|
#include <algorithms.hpp>
|
||||||
@ -17,14 +18,6 @@
|
|||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
inline uint64_t str_len(const char* a){
|
|
||||||
uint64_t length = 0;
|
|
||||||
while(*a++){
|
|
||||||
++length;
|
|
||||||
}
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename CharT>
|
template<typename CharT>
|
||||||
struct base_long {
|
struct base_long {
|
||||||
size_t capacity;
|
size_t capacity;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#ifndef STRING_VIEW_H
|
#ifndef STRING_VIEW_H
|
||||||
#define STRING_VIEW_H
|
#define STRING_VIEW_H
|
||||||
|
|
||||||
|
#include <cstring.hpp>
|
||||||
#include <types.hpp>
|
#include <types.hpp>
|
||||||
#include <algorithms.hpp>
|
#include <algorithms.hpp>
|
||||||
#include <iterator.hpp>
|
#include <iterator.hpp>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user