Turned away: 20 bytes, column 48.
Chapter 7 of 7
Workbench: the name field
Larkspur Supply Co.’s new sign-up form has a name field, and the customer file stores names in a column of fixed bytes.
This chapter: What should a name field count, and up to how many, so every name fits and matches?
About this chapter
You will learn
- Count what the store counts
- Normalise before you compare
- What people see has no byte limit
Words you’ll meet
- Column limit
- The most bytes the customer file stores for a name: a planning number written for this site.
Step 1 of 2
The : 48 bytes. Every name accepted and matching its record, and nothing typed may overflow.
Set the count, limit and normalising.
3 of 9 accepted · 7 of 9 match · worst case unbounded NOT YET
One grapheme can hold any number of accents, so nothing caps the bytes.
BytesCode pointsGraphemes (what people see)
12162432404864
| Name | Counted | Bytes | Matches |
|---|---|---|---|
| Zoë Okafor | 10 | 11 | ✓ yes |
| José Núñez | 10 | 16 | ✗ no |
| Siobhán Ní Bhriain | 18 ✗ | 20 | ✓ yes |
| Nguyễn Thị Minh Khai | 20 ✗ | 26 | ✗ no |
| Ελένη Παπαδοπούλου | 18 ✗ | 35 | ✓ yes |
| Олександра Шевченко | 19 ✗ | 37 | ✓ yes |
| 王秀英 | 3 | 9 | ✓ yes |
| Björn Guðmundsson | 17 ✗ | 19 | ✓ yes |
| Ana Lúcia Gonçalves | 19 ✗ | 21 | ✓ yes |
The names are fictional customers in real-world spellings; the column’s size is a planning number for this site.