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
Swap two integers
Use a temporary value to swap C integers without arithmetic overflow.
C✓ Tested
Update a JSON property
Create updated JSON text with JSON_MODIFY.
JSON_MODIFY✓ Tested
Use a default value for an unset variable
Supply a fallback without changing the original variable.
parameter expansion✓ Tested
Wrap long words
Allow long unbroken text to wrap within a CSS box.
CSS✓ Tested
Write a UTF-8 file
Write a Java string to a file using an explicit text encoding.
Java✓ Tested
Write a UTF-8 file
Use the built-in Node.js filesystem API to save text.
JavaScript✓ Tested
Write and read binary bytes
Java: Use the byte-oriented Files methods when text encoding should not be involved.
Java✓ Tested
Write and read raw bytes
C#: Use the byte-oriented file APIs when no text encoding should be applied.
C#✓ Tested