2. The char array is specified with %.xs. for example: "char t[30]" is specified with "%.30s", char a [20] - " %.20s "
3. "%u" is unsigned int.
4. "%d" is int.
5. When using %f to format a double data type, the double is truncated to 6 decimal places by default.
6. It is recommended that the "char[]" array be placed at the end of the structure to prevent parameter configuration errors such as "%.20s" from causing problems in parsing the entire buffer.
This function adds a formatted standard scanf string to the structure(lib_bscanf).
1. https://zh.cppreference.com/w/c/io/fscanf
- **special**:
1. Please use %lf for double precision, "%hf" or "%f" for float, long double ("%Lf") is not supported.
2. Please use %hhd or %hhu for a single char or unsigned char.
3. Use %hd or %hu for short int or unsigned short int.
4. When using %s or %c, please specify the length of the char array, such as %32s, %32c.
5. %s will check the string for spaces. When there are spaces in the string, it will be truncated. If you want to use string with spaces, please use %{length}c, but make sure that the length of the string can fill the array, otherwise an error will occur.