FIND YOUR NEXT FEW LINES

Results for “Text parsing & arithmetic”

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

512 snippets foundClear filters
CNumeric parsing & arithmetic

Parse an unsigned hexadecimal integer

C: Use an explicit base and check both range and full consumption.

C✓ Tested
C++Text validation & parsing

Read a quoted string containing spaces

C++: The quoted manipulator extracts a quoted field without splitting at internal spaces.

C++✓ Tested
CNumeric parsing & arithmetic

Reject NaN and infinite values

C: isfinite detects whether a floating-point value is an ordinary finite number.

C✓ Tested
CNumeric parsing & arithmetic

Round a halfway floating-point value

C: The C round function rounds halfway cases away from zero.

C✓ Tested
CNumeric parsing & arithmetic

Round downward and upward independently

C: floor and ceil round toward negative and positive infinity respectively.

C✓ Tested
C++Text validation & parsing

Trim surrounding ASCII whitespace

C++: Find the first and last non-whitespace bytes before taking a substring.

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
C++Text validation & parsing

Validate a complete identifier

C++: regex_match requires the pattern to match the complete input sequence.

C++✓ Tested
PowerShellStructured formats & encodings

Convert between hexadecimal text and bytes

PowerShell: Use the .NET hexadecimal helpers instead of parsing byte pairs manually.

PowerShell✓ Tested
PowerShellText & data

Read rows from CSV text

Parse CSV into objects with named properties.

CSV✓ Tested
HTMLGetting Started

Accept several lines of text

HTML: Learn how to accept several lines of text in a complete browser example.

HTML✓ Tested
HTMLForms

Add a multiline text field

Set a maximum length and visible rows on a labeled HTML textarea.

HTML✓ Tested