1 .TH fl_conversion_dynamic_partial_to_unsigned_detect "3" "February 2024" "FLL - Featureless Linux Library 0.6.9" "Library Functions"
3 fl_conversion_dynamic_partial_to_unsigned_detect
6 .B #include <fll/level_1/conversion.h>
8 \fBf_status_t fl_conversion_dynamic_partial_to_unsigned_detect\fP(
9 \fBconst fl_conversion_data_t \fP\fIdata\fP,
10 \fBconst f_string_static_t \fP\fIbuffer\fP,
11 \fBconst f_string_range_t \fP\fIrange\fP,
12 \fBf_number_unsigned_t *const \fP\fInumber\fP
17 Convert a series of positive number characters into an f_number_unsigned_t.
19 This will stop at one of the following: range.stop or a non-digit.
21 This will ignore NULL values.
23 This will not process signed statuses (+/-).
25 This will detect based types as follows:
26 - Hexidecimals begin with either '0x' or '0X'.
27 - Duodecimals begin with either '0d' or '0D'.
28 - Octals begin with either '0o' or '0O'.
29 - Binaries begin with either '0b' or '0B'.
30 - Decimal is used for all other cases.
32 Leading 0's and whitespace are ignored. Whitespace after the first digit is considered invalid.
34 This function is similar to strtoull(), but the behavior of error handling and special bases are different. In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix. Negative values are reported as such instead of being converted into the unsigned equivalent.
38 Conversion data for specifying things such as treating this as a negative number. This auto-detects the base and negative, ignoring the base number and negative flag.
42 The string to convert.
46 The start/stop range to convert.
50 This will store the value of the converted string. This value is only changed on success.
54 \fBF_none\fP on success.
56 \fBF_data_not\fP if string starts with a null (length is 0).
58 \fBF_base_not\fP (with error bit) if no supported or valid base unit is provided.
60 \fBF_complete_not_utf\fP (with error bit) if an incomplete UTF-8 fragment is found.
62 \fBF_number\fP (with error bit) if parameter is not a number.
64 \fBF_number_decimal\fP (with error bit) if number has a decimal digit.
66 \fBF_number_negative\fP (with error bit) on negative value.
68 \fBF_number_positive\fP (with error bit) on positive value (has a +, such as '+1', when only '1' is valid here).
70 \fBF_number_overflow\fP (with error bit) on integer overflow.
72 \fBF_parameter\fP (with error bit) if a parameter is invalid.
77 \fIfl_conversion_dynamic_partial_to_signed\fP(3), \fIfl_conversion_dynamic_partial_to_signed_detect\fP(3), \fIfl_conversion_dynamic_partial_to_unsigned\fP(3), \fIfl_conversion_dynamic_partial_to_unsigned_detect\fP(3), \fIfl_conversion_dynamic_to_signed\fP(3), \fIfl_conversion_dynamic_to_signed_detect\fP(3), \fIfl_conversion_dynamic_to_unsigned\fP(3), \fIfl_conversion_dynamic_to_unsigned_detect\fP(3), \fIstrtoull()\fP
84 Copyright \(co 2007-2024 Kevin Day, GNU LGPL Version 2.1 or later.