Skip to content

Commit c9afdce

Browse files
author
Akshay Sharma
committed
Update stream.ParseInt.adoc
1 parent 1763333 commit c9afdce

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Language/Functions/Communication/Stream/streamParseInt.adoc

+11-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212

1313
[float]
1414
=== Description
15-
`parseInt()` returns the first valid (long) integer number from the current position. Initial characters that are not integers (or the minus sign) are skipped. `parseInt()` is terminated by the first character that is not a digit.
15+
`parseInt()` returns the first valid (long) integer number from the current position. Initial characters that are not integers (or the minus sign) are skipped.
16+
17+
In particular:
18+
19+
* Initial characters that are not digits or a minus sign, are skipped; +
20+
* Parsing stops when no characters have been read for a configurable time-out value, or a non-digit is read; +
21+
* If no valid digits were read when the time-out (see link:setTimeout{ext-relative}[Stream.setTimeout()]) occurs, 0 is returned;
1622

1723
This function is part of the Stream class, and is called by any class that inherits from it (Wire, Serial, etc). See the link:stream{ext-relative}[Stream class] main page for more information.
1824
[%hardbreaks]
@@ -22,16 +28,19 @@ This function is part of the Stream class, and is called by any class that inher
2228
=== Syntax
2329
`stream.parseInt(list)`
2430

31+
`stream.parseInt(''list', char skipchar')`
2532

2633
[float]
2734
=== Parameters
2835
`stream` : an instance of a class that inherits from Stream.
2936

3037
`list` : the stream to check for ints (`char`)
3138

39+
`skipChar`: used to skip the indicated char in the search. Used for example to skip thousands divider.
40+
3241
[float]
3342
=== Returns
34-
`int`
43+
`long`
3544

3645
--
3746
// OVERVIEW SECTION ENDS

0 commit comments

Comments
 (0)