FIND YOUR NEXT FEW LINES

Results for “parse”

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

66 snippets foundClear filters
Arduino / CSerial protocols

Read an integer from serial input

Arduino / C: parseInt skips leading nonnumeric characters and reads the next integer.

Arduino / C✓ Tested
GoErrors & validation

Reject an integer outside a byte’s range

Reject an integer outside a byte’s range using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CText & bounded buffers

Reject an integer with trailing characters

Arduino / C: strtol exposes an end pointer so a parser can require the entire token.

Arduino / C✓ Tested
C#Strings

Try parsing an integer

Use TryParse to avoid exceptions for invalid C# integer input.

C#✓ Tested
CNumeric parsing & arithmetic

Validate a complete floating-point input

C: strtod exposes both the stopping position and range errors; reject nonfinite results when required.

C✓ Tested
JavaNumbers & dates

Add days to a date

Parse an ISO date and add calendar days using Java LocalDate.

Java✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check a script’s syntax without executing its body

Bash Scripts: bash -n parses commands but does not run ordinary script statements.

Bash Scripts✓ Tested
PowerShellDates & numeric validation

Count days between calendar dates

PowerShell: Parse an unambiguous format before subtracting date values.

PowerShell✓ Tested
GitRemotes & additional checkouts

Distinguish a bare repository from a working checkout

Git: rev-parse reports repository mode without relying on directory naming conventions.

Git✓ Tested
PythonText validation & encoding

Extract named regex fields

Python: Use named capture groups to parse a known date-shaped identifier.

Python✓ Tested
jQueryHTTP requests

Fetch and display JSON

jQuery: getJSON parses a successful JSON response.

jQuery✓ Tested
PowerShellText & data

Format a date without locale ambiguity

Parse an ISO date and format it consistently.

date✓ Tested