diff --git a/Format.dir/format.h b/Format.dir/format.h new file mode 100644 index 0000000..678d03f --- /dev/null +++ b/Format.dir/format.h @@ -0,0 +1,40 @@ +static_assert( __cplusplus > 2020'99 ); + +#pragma once + +#include + +#include + +namespace Alepha::Hydrogen::Format ::detail:: format_m +{ + inline namespace exports + { + std::string operator ""_format ( const char *p, std::size_t sz ); + } + + inline std::string + exports::operator ""_format ( const char *const p, const std::size_t sz ) + { + std::string s{ p, p + s }; + + if( s.empty() ) return s; + std::size_t indent= 0; + if( s.at( 0 ) == '\n' ) + { + s= s.substr( 1 ); + while( s.at( 0 ) == ' ' ) + { + ++indent; + s= s.substr( 1 ); + } + } + + + } +} + +namespace Alepha::Hydrogen::Format::inline exports::inline format_m +{ + using namespace detail::format_m::exports; +}