Results for “STRING_SPLIT”
Small, practical examples. Search by task or narrow things down below.
Remove a trailing line ending
Use strcspn to terminate a C string at its first newline or carriage return.
C✓ Tested
Remove an optional attribute entirely
jQuery: removeAttr removes the attribute instead of setting a string that might still activate it.
jQuery✓ Tested
Repeat text a fixed number of times
Java: Use String.repeat with a nonnegative repetition count.
Java✓ Tested
Replace a nested JSONB value
Change one path with jsonb_set.
jsonb_set✓ Tested
Replace a path extension
C#: Path.ChangeExtension transforms a path string without moving or creating a file.
C#✓ Tested
Replace all literal matches
Replace repeated substrings with JavaScript replaceAll.
JavaScript✓ Tested
Replace literal text
Replace every literal occurrence in a C# string.
C#✓ Tested
Replace literal text
Replace all literal matches in a Java string without regular expressions.
Java✓ Tested
Replace NULL in a result
Choose a fallback for a missing value.
COALESCE✓ Tested
Replace text with sed
Replace all occurrences of the substring old on each line and print the transformed text without changing the input file.
sed✓ Tested
Replace the first match
Find and replace one literal substring in C++.
C++✓ Tested
Represent a finite set of states
Java: Use an enum to prevent arbitrary strings from representing application states.
Java✓ Tested