Results for “measure”
Small, practical examples. Search by task or narrow things down below.
Measure a small seekable binary file
C: Seek to the end and inspect ftell, checking both operations for errors.
C✓ Tested
Measure a string length
Count bytes before the null terminator with C strlen.
C✓ Tested
Measure an element after layout
Measure an element after layout with a small React component and explicit browser behavior.
React✓ Tested
Measure content, padding, and borders separately
jQuery: width, innerWidth, and outerWidth measure different parts of the box.
jQuery✓ Tested
Measure the byte length of UTF-8 text
C#: Character count and encoded byte count can differ for non-ASCII text.
C#✓ Tested
Measure the length of ordinary text
SQL: Use the engine’s text-length function; this ASCII example has no trailing spaces.
SQL✓ Tested
Measure the length of ordinary text
SQL Server: Use the engine’s text-length function; this ASCII example has no trailing spaces.
SQL Server✓ Tested
Measure the length of ordinary text
Postgres: Use the engine’s text-length function; this ASCII example has no trailing spaces.
Postgres✓ Tested
Measure the length of ordinary text
SQLite: Use the engine’s text-length function; this ASCII example has no trailing spaces.
SQLite✓ Tested
Measure UTF-8 bytes separately from characters
Java: Encode a Java string before measuring its serialized byte length.
Java✓ Tested
Show a bounded measurement
Display a measured value within a known range using HTML meter.
HTML✓ Tested
Sum a collection
Calculate a total with Measure-Object.
Measure-Object✓ Tested