Results for “bounded”
Small, practical examples. Search by task or narrow things down below.
Split an array into bounded batches
TypeScript: Advance by a positive batch size and allow a shorter final chunk.
TypeScript✓ Tested
Store a bounded null-terminated text setting
Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.
Arduino / C✓ Tested
Use a recursive function for a bounded calculation
Bash Scripts: A recursive factorial demonstrates local variables and a clear base case.
Bash Scripts✓ Tested
Append text only when the destination has enough capacity
C: Check the combined lengths including the terminator before using strcat.
C✓ Tested
Compare a command case-sensitively
Arduino / C: strcmp returns zero when both null-terminated strings match.
Arduino / C✓ Tested
Copy a string with a guaranteed terminator
Arduino / C: Reserve one character for the terminator when copying a bounded string.
Arduino / C✓ Tested
Detect truncated formatted output
Arduino / C: snprintf returns the length it would have written, excluding the null terminator.
Arduino / C✓ Tested
Extract a section of an Arduino String
Arduino / C: substring includes the start index and excludes the end index.
Arduino / C✓ Tested
Format several integers in a fixed buffer
Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.
Arduino / C✓ Tested
Keep a serial message in flash memory
Arduino / C: The F macro keeps a literal out of scarce SRAM.
Arduino / C✓ Tested
Reject an integer with trailing characters
Arduino / C: strtol exposes an end pointer so a parser can require the entire token.
Arduino / C✓ Tested
Reject insertion when a fixed queue is full
Arduino / C: Track a count separately from circular read and write positions.
Arduino / C✓ Tested