acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
string_meta_data.h
1// to string_heap_data on 2025-04-21 15:38 <3ThomasBorregaardSørensen!!
2#pragma once
3
4
5
6template < typename STRING >
7inline STRING & string_concatenate(STRING & strResult, const typename STRING::CHARACTER_TYPE * psz1, character_count nLength1, const typename STRING::CHARACTER_TYPE * psz2, character_count nLength2);
8
9//template < typename CHARACTER_TYPE >
10//class string_buffer;
11#include "acme/prototype/prototype/natural_pointer.h"
12
13
14template < prototype_character CHARACTER >
16 public heap_data < CHARACTER >
17{
18public:
19
20
21 typedef string_heap_data < CHARACTER > STRING_HEAP_DATA;
22
23
24 using heap_data < CHARACTER >::heap_data;
25
26
28 inline ::memsize storage_size() const { return (::memsize) this->m_sizeStorageInBytes; }
30 inline ::character_count storage_character_count() const;
31
32
34 //inline ::character_count character_count() const { return (::character_count) this->m_countData; }
35 //inline ::memsize character_count_in_bytes() const;
36 //inline ::memsize null_terminated_character_count_in_bytes() const;
37
38
39 //inline void raw_set_character_count(::character_count character_count);
40 //inline void set_character_count(::character_count character_count);
41
42
43 operator const CHARACTER * () const noexcept { return this->begin(); }
44
45
46 operator CHARACTER * () noexcept { return this->data(); }
47
48
49 const CHARACTER * c_str() const noexcept { return this->begin(); }
50
51
52};
53
54
55template < >
56CLASS_DECL_ACME base_data < string_heap_data < ::ansi_character > > * __nil < base_data < string_heap_data < ::ansi_character > > >();
57
58template < >
59CLASS_DECL_ACME base_data < string_heap_data < ::wd16_character > > * __nil < base_data < string_heap_data < ::wd16_character > > >();
60
61template < >
62CLASS_DECL_ACME base_data < string_heap_data < ::wd32_character > > * __nil < base_data < string_heap_data < ::wd32_character > > >();
63
64
65
66
67
68enum e_char_count
69{
70
71 char_count,
72};
73
74enum e_byte_count
75{
76
77 byte_count,
78};
79
80
81//#include "acme/memory/string_memory_allocator.h"
82
83
84
Definition string_meta_data.h:17
inline ::character_count storage_character_count() const
storage_size expressed in number of characters
inline ::memsize storage_size() const
in bytes, without meta, with null(s)
Definition string_meta_data.h:28