Rise
The Vieneo Province
Toggle main menu visibility
Loading...
Searching...
No Matches
StringUtilities.h
Go to the documentation of this file.
1
#pragma once
2
3
inline
void
Format4Sig
(
wchar_t
* res,
const
float
num)
4
{
5
if
(num < 10.0f)
6
swprintf_s(res, 16, L
"%4.3f"
, num);
7
else
if
(num < 100.0f)
8
swprintf_s(res, 16, L
"%4.2f"
, num);
9
else
if
(num < 1000.0f)
10
swprintf_s(res, 16, L
"%4.1f"
, num);
11
else
12
swprintf_s(res, 16, L
"%4.0f"
, num);
13
}
14
15
inline
bool
IsNullOrWhitespace
(
const
WCHAR*
string
)
16
{
17
if
(!
string
)
18
return
true
;
19
20
for
(
const
WCHAR* p =
string
; *p; ++p)
21
{
22
if
(!iswspace(*p))
23
return
false
;
24
}
25
return
true
;
26
}
Format4Sig
void Format4Sig(wchar_t *res, const float num)
Definition
StringUtilities.h:3
IsNullOrWhitespace
bool IsNullOrWhitespace(const WCHAR *string)
Definition
StringUtilities.h:15
StringUtilities.h
Generated on
for Rise by
1.18.0