FIND YOUR NEXT FEW LINES

Results for “Strings & literal text”

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

495 snippets foundClear filters
Bash ScriptsInput streams & redirection

Write a literal multiline block

Bash Scripts: Quoting the heredoc delimiter disables parameter and command expansion inside it.

Bash Scripts✓ Tested
PythonFiles & paths

Write a text file

Save a string to a UTF-8 text file and close the file automatically when the write finishes.

file✓ Tested
C#Files & paths

Write a text file

Write a C# string to a UTF-8 file.

C#✓ Tested
C++Files & paths

Write a text file

Write and close a C++ output file while checking stream failure.

C++✓ Tested
CFiles

Write a text file

Open, write, and close a C file while checking every operation.

C✓ Tested
C++Filesystem operations

Write and read bytes without text conversion

C++: Use binary stream modes and check each I/O operation before consuming its result.

C++✓ Tested
RustTesting & reusable patterns

Write formatted text into a byte buffer

Write formatted text into a byte buffer in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsGetting Started

Write several literal lines

Bash Scripts: Write several literal lines with a small standalone Bash program.

Bash Scripts✓ Tested
HTMLText semantics

Write subscripts and superscripts in ordinary text

HTML: Sub and sup position short annotations such as formula indices and exponents.

HTML✓ Tested
Linux CommandsGetting Started

Write text to a new practice file

Linux Commands: Write text to a new practice file using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
PowerShellFiles & paths

Write UTF-8 text to a file

Save a string without adding an extra newline.

Set-Content✓ Tested
JavaText validation & formatting

Check a filename suffix

Java: Use endsWith for a case-sensitive literal suffix test.

Java✓ Tested