Zip Codes
The Protector stage library includes the following category functions for zip codes. You can use these functions only in stages included in the Protector stage library.
- US_ZIP_CODE:stateGroup()
- Returns the state group of United States zip codes. The state group is the first digit of the zip code.
- US_ZIP_CODE:region()
- Returns the region, or sectional center facility (SCF), numbers of United States zip codes. The region group is the second and third digits of a zip code.
- US_ZIP_CODE:cityArea()
- Returns the city or town area numbers of United States zip codes. The city or town area is the fourth and fifth digits of a zip code.
- US_ZIP_CODE:specificLocation()
- Returns the specific geographic location, which is the last four digits of a 9 digit United States zip code. The specific geographic location is also known as the +4 part of a zip code.
- US_ZIP_CODE:specificLocationOrDefault(<default>)
- Returns the specific geographic location, which is the last four digits of a 9 digit United States zip code. The specific geographic location is also known as the +4 part of a zip code. When a zip code does not include the specific geographic location, this function returns the user-defined default value.
- US_ZIP_CODE:std()
- Returns zip codes in one of the following standard
formats:
<five digit zip> <five digit zip>-<specific location>