Results for “prefix”
Small, practical examples. Search by task or narrow things down below.
Read the beginning of a text value
C#: Extract or display the first three ASCII characters from a known nonempty string.
C#✓ Tested
Read the beginning of a text value
Java: Extract or display the first three ASCII characters from a known nonempty string.
Java✓ Tested
Read the beginning of a text value
JavaScript: Extract or display the first three ASCII characters from a known nonempty string.
JavaScript✓ Tested
Read the beginning of a text value
TypeScript: Extract or display the first three ASCII characters from a known nonempty string.
TypeScript✓ Tested
Read the beginning of a text value
C++: Extract or display the first three ASCII characters from a known nonempty string.
C++✓ Tested
Read the beginning of a text value
C: Extract or display the first three ASCII characters from a known nonempty string.
C✓ Tested
Calculate a fixed-window moving average
C: For this small window, sum each complete group and skip incomplete prefixes.
C✓ Tested
Calculate cumulative totals
C++: partial_sum writes the sum of each input prefix to the output sequence.
C++✓ Tested
Combine text with a name
Python: Construct a greeting from a fixed prefix and a stored name.
Python✓ Tested
Combine text with a name
C#: Construct a greeting from a fixed prefix and a stored name.
C#✓ Tested
Combine text with a name
Java: Construct a greeting from a fixed prefix and a stored name.
Java✓ Tested
Combine text with a name
JavaScript: Construct a greeting from a fixed prefix and a stored name.
JavaScript✓ Tested