FIND YOUR NEXT FEW LINES

Results for “case”

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

73 snippets foundClear filters
AngularPipes & formatting

Capitalize words with TitleCasePipe

Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
GoTesting & reusable helpers

Check a function with table-driven cases

Check a function with table-driven cases using a complete Go program with explicit sample inputs.

Go✓ Tested
PowerShellStrings & literal text

Check a suffix without case sensitivity

PowerShell: Use an ordinal case-insensitive comparison for a known filename extension.

PowerShell✓ Tested
C#Text validation & encoding

Check an extension without case sensitivity

C#: Use an explicit ordinal case-insensitive comparison for a known filename suffix.

C#✓ Tested
Bash ScriptsGetting Started

Choose an action with case

Bash Scripts: Choose an action with case with a small standalone Bash program.

Bash Scripts✓ Tested
Arduino / CText & bounded buffers

Compare a command case-sensitively

Arduino / C: strcmp returns zero when both null-terminated strings match.

Arduino / C✓ Tested
RustStrings & Unicode

Compare ASCII text ignoring case

Compare ASCII text ignoring case in a complete Rust program using the standard library.

Rust✓ Tested
GoStrings & text

Compare text ignoring case

Compare text ignoring case using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonText validation & encoding

Compare Unicode text without case

Python: Casefold handles more Unicode case mappings than lower for caseless comparison.

Python✓ Tested
Bash ScriptsVariables & text

Convert a string to lowercase

Normalize a text value using Bash expansion.

lowercase✓ Tested
Bash ScriptsParameter expansion

Convert a variable to uppercase

Bash Scripts: Double caret transforms matching lowercase characters in Bash 4 or later.

Bash Scripts✓ Tested
C++Text validation & parsing

Convert ASCII text to lowercase safely

C++: Cast each byte to unsigned char before using the cctype function.

C++✓ Tested