FIND YOUR NEXT FEW LINES

Results for “parse”

Small, practical examples. Search by task or narrow things down below.

66 snippets foundClear filters
JavaScriptUTC date operations

Sort timestamp strings by their parsed instants

JavaScript: Compare epoch values explicitly when date strings may contain different offsets.

JavaScript✓ Tested
TypeScriptUTC date operations

Sort timestamp strings by their parsed instants

TypeScript: Compare epoch values explicitly when date strings may contain different offsets.

TypeScript✓ Tested
PythonGetting Started

Convert known numeric text to an integer

Python: Convert a trusted literal to an integer before adding. Validate external input before converting it.

Python✓ Tested
C#Getting Started

Convert known numeric text to an integer

C#: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C#✓ Tested
JavaGetting Started

Convert known numeric text to an integer

Java: Convert a trusted literal to an integer before adding. Validate external input before converting it.

Java✓ Tested
JavaScriptGetting Started

Convert known numeric text to an integer

JavaScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.

JavaScript✓ Tested
TypeScriptGetting Started

Convert known numeric text to an integer

TypeScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.

TypeScript✓ Tested
C++Getting Started

Convert known numeric text to an integer

C++: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C++✓ Tested
CGetting Started

Convert known numeric text to an integer

C: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C✓ Tested
C++Numeric parsing & calculations

Handle a failed string-to-integer conversion

C++: stoi throws invalid_argument when no conversion can be performed.

C++✓ Tested
Arduino / CSerial protocols

Read a decimal number from serial input

Arduino / C: parseFloat parses a signed decimal value from the input stream.

Arduino / C✓ Tested
GoHTTP & URLs

Read a URL’s host and path

Read a URL’s host and path using a complete Go program with explicit sample inputs.

Go✓ Tested