Results for “lead”
Small, practical examples. Search by task or narrow things down below.
Count a leading run of allowed characters
C: strspn counts bytes at the start that belong to a specified character set.
C✓ Tested
Format a numeric label with leading zeroes
Bash Scripts: Use a constant printf format string and supply values as separate arguments.
Bash Scripts✓ Tested
Pad a label with leading zeroes
PowerShell: Use a numeric format specifier to control the displayed width.
PowerShell✓ Tested
Parse digits with leading zeroes as decimal
Bash Scripts: The 10# prefix avoids Bash treating a leading zero as an octal notation.
Bash Scripts✓ Tested
Remove a leading directory while extracting
Linux Commands: Use strip-components only after inspecting a trusted archive layout.
Linux Commands✓ Tested
Read the next row’s value
SQL: LEAD reads a later ordered row without a self join and supports a fallback at the end.
SQL✓ Tested
Read the next row’s value
SQL Server: LEAD reads a later ordered row without a self join and supports a fallback at the end.
SQL Server✓ Tested
Read the next row’s value
Postgres: LEAD reads a later ordered row without a self join and supports a fallback at the end.
Postgres✓ Tested
Read the next row’s value
SQLite: LEAD reads a later ordered row without a self join and supports a fallback at the end.
SQLite✓ Tested
Count repeated lines after sorting
Linux Commands: Group identical lines before uniq -c, then normalize its leading padding.
Linux Commands✓ Tested
Pad a numeric label to a fixed width
C#: Use a numeric format specifier to add leading zeroes.
C#✓ Tested
Read an integer from serial input
Arduino / C: parseInt skips leading nonnumeric characters and reads the next integer.
Arduino / C✓ Tested