FIND YOUR NEXT FEW LINES

Results for “Text validation & encoding”

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

545 snippets foundClear filters
JavaScriptRegular expressions & URL encoding

Validate a whole ASCII identifier

JavaScript: Use an anchored expression without the multiline flag and reject a trailing line break explicitly.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Validate a whole ASCII identifier

TypeScript: Use an anchored expression without the multiline flag and reject a trailing line break explicitly.

TypeScript✓ Tested
TypeScriptSafe data handling

Validate an unknown value with a type guard

Check a field before treating unknown data as a typed object.

unknown✓ Tested
GoErrors & validation

Validate UTF-8 bytes

Validate UTF-8 bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
PowerShellStrings & literal text

Write a multiline string without expanding variables

PowerShell: A single-quoted here-string preserves dollar signs literally.

PowerShell✓ Tested
JavaEncoding & structured values

Write and read typed binary fields

Java: Data streams use a matching write/read order and fixed encodings for Java primitive values.

Java✓ Tested
PowerShellStructured formats & encodings

Write object records to a CSV file

PowerShell: Export-Csv uses property names as headers and quotes values when needed.

PowerShell✓ Tested
HTMLInput constraints

Limit a numeric input to an inclusive range

HTML: Number inputs expose range validation separately from the entered text.

HTML✓ Tested
PythonJSON & CSV

Read a JSON file

Load a JSON document from disk into Python objects using an explicitly selected text encoding.

json✓ Tested
JavaFiles & paths

Write a UTF-8 file

Write a Java string to a file using an explicit text encoding.

Java✓ Tested
JavaFile operations & binary data

Write and read binary bytes

Java: Use the byte-oriented Files methods when text encoding should not be involved.

Java✓ Tested
C#File operations & paths

Write and read raw bytes

C#: Use the byte-oriented file APIs when no text encoding should be applied.

C#✓ Tested