1 .TH fl_conversion_dynamic_partial_to_unsigned_detect "3" "July 2023" "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 Hexidecimals begin with either '0x' or '0X'.
21 Duodecimals begin with either '0d' or '0D'.
23 Octals begin with either '0o' or '0O'.
25 Binaries begin with either '0b' or '0B'.
27 Decimal is used for all other cases.
29 Leading 0's and whitespace are ignored. Whitespace after the first digit is considered invalid.
31 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.
35 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.
39 The string to convert.
43 The start/stop range to convert.
47 This will store the value of the converted string. This value is only changed on success.
51 \fBF_none\fP on success.
53 \fBF_data_not\fP if string starts with a null (length is 0).
55 \fBF_base_not\fP (with error bit) if no supported or valid base unit is provided.
57 \fBF_complete_not_utf\fP (with error bit) if an incomplete UTF-8 fragment is found.
59 \fBF_number\fP (with error bit) if parameter is not a number.
61 \fBF_number_decimal\fP (with error bit) if number has a decimal digit.
63 \fBF_number_negative\fP (with error bit) on negative value.
65 \fBF_number_positive\fP (with error bit) on positive value (has a +, such as '+1', when only '1' is valid here).
67 \fBF_number_overflow\fP (with error bit) on integer overflow.
69 \fBF_parameter\fP (with error bit) if a parameter is invalid.
74 Copyright \(co 2007-2023 Kevin Day, GNU LGPL Version 2.1 or later.