summaryrefslogtreecommitdiff
path: root/zap/source/any/str/fmtlen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'zap/source/any/str/fmtlen.cc')
-rw-r--r--zap/source/any/str/fmtlen.cc37
1 files changed, 0 insertions, 37 deletions
diff --git a/zap/source/any/str/fmtlen.cc b/zap/source/any/str/fmtlen.cc
deleted file mode 100644
index b5e508c..0000000
--- a/zap/source/any/str/fmtlen.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- Copyright 2022-2023 Gabriel Jensen.
- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
- If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>.
-*/
-
-#include <zap/math.hh>
-#include <zap/str.hh>
-
-#include "numdig.hh"
-
-namespace zap {
- namespace impl {
- template<typename typ> zap_attr_iln inline static auto fmtlen(typ val,::zap::i8 const bs) noexcept -> ::zap::i8 {
- ::zap::i8 len = 0x0u;
- if (val < 0x0) {
- val = static_cast<typ>(::zap::abs(val));
- len = 0x1u;
- }
- len += ::zap::impl::numdig(val,bs);
- return len;
- }
- }
-}
-
-extern "C" {
- auto zap_fmtleni( int const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlenl( long const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlenll( long long const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlens( short const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlensc( signed char const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlenuc( unsigned char const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlenui( unsigned int const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlenul( unsigned long const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlenull(unsigned long long const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
- auto zap_fmtlenus( unsigned short const val,::zap::i8 const bs) -> ::zap::i8 {return ::zap::impl::fmtlen(val,bs);}
-}