You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ Output:
85
85
> noice - 90000 - 160 - 20 - 9.99 - FFFFFF
86
86
87
87
Notice how each character within `"sLdcfx-"` string specifies different type for each column. It is very important to set this format right.
88
-
We could set each solumn to be strings like "sssssss", however this would use more memory than it's really needed. If we wanted to store a large array of small numerical values (e.g. under 128), then using "c" specifier would be appropriate. See "How to specify value types" section for full list of available specifiers and their descriptions.
88
+
We could set each solumn to be strings like "sssssss", however this would use more memory than it's really needed. If we wanted to store a large array of small numerical values (e.g. under 128), then using "c" specifier would be appropriate. See [Specifying value types](#specifying-value-types) section for full list of available specifiers and their descriptions.
89
89
90
90
**Is it necessary to supply the whole string at once?**
91
91
No, it may be supplied in incomplete parts as shown in [this example](https://github.com/michalmonday/CSV-Parser-for-Arduino/blob/master/examples/supplying_csv_by_incomplete_parts/supplying_csv_by_incomplete_parts.ino).
@@ -203,16 +203,22 @@ CSV_Parser cp(csv_str, /*format*/ "sf"); // s = string, f = float
203
203
Example above is specifying "s" (string) for the 1st column, and "f" (float) for the 2nd column.
204
204
205
205
Possible specifiers are:
206
-
**s** - string (C-like string, not a "String" Arduino object, just a char pointer, terminated by 0)
207
-
**f** - float
208
-
**L** - int32_t (32-bit signed value, can't be used for values over 2147483647)
209
-
**d** - int16_t (16-bit signed value, can't be used for values over 32767)
210
-
**c** - char (8-bit signed value, can't be used for values over 127)
211
-
**x** - hex (stored as int32_t)
212
-
**-** (dash character) means that value is unused/not-parsed (this way memory won't be allocated for values from that column)
206
+
| Specifier | Type | Description |
207
+
| --- | --- | --- |
208
+
|**s**| string (char\*) | C-like string, not a "String" Arduino object. |
209
+
|**f**| float |
210
+
|**L**| int32_t | 32-bit signed value, value range: -2,147,483,648 to 2,147,483,647. |
211
+
|**d**| int16_t | 16-bit signed value, value range: -32,768 to 32,767. |
212
+
|**c**| char | 8-bit signed value, value range: -128 to 127. |
213
+
|**x**| int32_t | Expects hexadecimal string (will store "10" or "0x10" csv as 16). |
214
+
|**-**|| Dash character means that value is unused/not-parsed, this way memory won't be allocated for values from that column. |
215
+
|**uL**| uint32_t | 32-bit unsigned value, value range: 0 to 4,294,967,295. |
216
+
|**ud**| uint16_t | 16-bit unsigned value, value range: 0 to 65,535. |
217
+
|**uc**| uint8_t | 8-bit unsigned value, value range: 0 to 255. |
218
+
|**ux**| uint32_t | Expects hexadecimal string (will store "10" or "0x10" csv as 16). |
213
219
214
220
#### How to store unsigned types
215
-
By preceding the integer based specifiers ("L", "d", "c", "x") with "u".
221
+
As shown in the table above, unsigned type specifiers are made by preceding the integer based specifiers ("L", "d", "c", "x") with "u".
0 commit comments