mirror of
https://github.com/Ed94/gencpp.git
synced 2024-11-10 02:54:53 -08:00
Ed_
c5afede7b5
Removing the gen. namespace from the files for components, dependencies, and file_processors. They are only necessary if the include directory is transparent, and in my case those are not. Made a docs directory. I'm offloading information from the main readme to there along with additional informationn I end up elaborating on down the line. Enum tables were moved to their own directory (project/enums). Library will not compile for now. Major refactor occuring with parsing related components.
40 lines
788 B
C++
40 lines
788 B
C++
#pragma region String
|
|
|
|
String String::fmt( AllocatorInfo allocator, char* buf, sw buf_size, char const* fmt, ... )
|
|
{
|
|
va_list va;
|
|
va_start( va, fmt );
|
|
str_fmt_va( buf, buf_size, fmt, va );
|
|
va_end( va );
|
|
|
|
return make( allocator, buf );
|
|
}
|
|
|
|
String String::fmt_buf( AllocatorInfo allocator, char const* fmt, ... )
|
|
{
|
|
local_persist thread_local
|
|
char buf[ GEN_PRINTF_MAXLEN ] = { 0 };
|
|
|
|
va_list va;
|
|
va_start( va, fmt );
|
|
str_fmt_va( buf, GEN_PRINTF_MAXLEN, fmt, va );
|
|
va_end( va );
|
|
|
|
return make( allocator, buf );
|
|
}
|
|
|
|
bool String::append_fmt( char const* fmt, ... )
|
|
{
|
|
sw res;
|
|
char buf[ GEN_PRINTF_MAXLEN ] = { 0 };
|
|
|
|
va_list va;
|
|
va_start( va, fmt );
|
|
res = str_fmt_va( buf, count_of( buf ) - 1, fmt, va ) - 1;
|
|
va_end( va );
|
|
|
|
return append( buf, res );
|
|
}
|
|
|
|
#pragma endregion String
|