Results for “read text”
Small, practical examples. Search by task or narrow things down below.
Count the items in a collection
C#: Read the collection’s length instead of hard-coding the loop limit.
C#✓ Tested
Count the items in a collection
Java: Read the collection’s length instead of hard-coding the loop limit.
Java✓ Tested
Count the items in a collection
JavaScript: Read the collection’s length instead of hard-coding the loop limit.
JavaScript✓ Tested
Count the items in a collection
TypeScript: Read the collection’s length instead of hard-coding the loop limit.
TypeScript✓ Tested
Count the items in a collection
C++: Read the collection’s length instead of hard-coding the loop limit.
C++✓ Tested
Count the items in a collection
C: Read the collection’s length instead of hard-coding the loop limit.
C✓ Tested
Create a directory tree
Create a directory and its missing parent directories. The -p option also succeeds when the directories already exist.
directory✓ Tested
Create a symbolic link
Create a relative symbolic link to a file and inspect its target with readlink.
symlink✓ Tested
Create an annotated release tag
Mark a revision with a readable release description.
tag✓ Tested
Create nested folders
Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.
directory✓ Tested
Declare LF normalization for a file type
Git: A gitattributes rule records text normalization expectations for matching paths.
Git✓ Tested
Delete one known scratch file
C++: filesystem::remove reports whether an item was removed and also supports empty directories.
C++✓ Tested