Results for “read text”
Small, practical examples. Search by task or narrow things down below.
Measure a short text value
C++: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C++✓ Tested
Measure a short text value
C: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C✓ Tested
Parse JSON text
Read a JavaScript object from JSON text.
JavaScript✓ Tested
Process a text file one line at a time
Java: Use a buffered reader to avoid loading a large file into memory.
Java✓ Tested
Read a data attribute
Read an element data attribute with jQuery data.
jQuery✓ Tested
Read a file line by line
Read C++ text lines without loading the whole file at once.
C++✓ Tested
Read a JSON file
Load a JSON document from disk into Python objects using an explicitly selected text encoding.
json✓ Tested
Read a small INI configuration
Python: Use ConfigParser typed accessors for configuration values stored as text.
Python✓ Tested
Read a UTF-8 file
Read a small file as text using Node.js.
JavaScript✓ Tested
Replace text using captured regex groups
C++: Numbered replacement groups can rearrange a known two-part name.
C++✓ 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