mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-07 08:25:41 +00:00
argument parser for simple STAP arguments
This commit is contained in:
committed by
Ryan Fleury
parent
c4c9ef5182
commit
bda3a71379
@@ -616,6 +616,22 @@ str8_is_integer(String8 string, U32 radix)
|
||||
return result;
|
||||
}
|
||||
|
||||
internal B32
|
||||
str8_is_integer_signed(String8 string, U32 radix)
|
||||
{
|
||||
B32 result = 0;
|
||||
String8 sign = str8_prefix(string, 1);
|
||||
if(str8_match(sign, str8_lit("-"), 0))
|
||||
{
|
||||
result = str8_is_integer(str8_skip(string, 1), radix);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = str8_is_integer(string, radix);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal U64
|
||||
u64_from_str8(String8 string, U32 radix)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user