Results for “k”
Small, practical examples. Search by task or narrow things down below.
Replace text in a string
Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.
string✓ Tested
Replace text using captured regex groups
C++: Numbered replacement groups can rearrange a known two-part name.
C++✓ Tested
Replace text with parameter expansion
Bash Scripts: Replace text with parameter expansion with a small standalone Bash program.
Bash Scripts✓ Tested
Represent a decimal quantity with a scaled integer
Arduino / C: Integer hundredths avoid floating-point storage for fixed-precision values.
Arduino / C✓ Tested
Represent a set with empty structs
Represent a set with empty structs using a complete Go program with explicit sample inputs.
Go✓ Tested
Represent an enabled state
Arduino / C: Represent an enabled state on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Require a minimum text length
Require a minimum text length with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Require a nonempty text value
HTML: The required attribute makes an empty text control fail native constraint validation.
HTML✓ Tested
Require an input value
Require an input value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Require two conditions to be true
Python: Combine a lower and an upper bound to check whether a value is in range.
Python✓ Tested
Require two conditions to be true
C#: Combine a lower and an upper bound to check whether a value is in range.
C#✓ Tested
Require two conditions to be true
Java: Combine a lower and an upper bound to check whether a value is in range.
Java✓ Tested