MCPcopy Create free account
hub / github.com/denoland/std / isAlpha

Function isAlpha

http/unstable_structured_fields.ts:448–452  ·  view source on GitHub ↗

Check if character is alphabetic (A-Z or a-z)

(c: string)

Source from the content-addressed store, hash-verified

446
447/** Check if character is alphabetic (A-Z or a-z) */
448function isAlpha(c: string): boolean {
449 const code = c.charCodeAt(0);
450 return (code >= CHAR_CODE_UPPER_A && code <= CHAR_CODE_UPPER_Z) ||
451 (code >= CHAR_CODE_LOWER_A && code <= CHAR_CODE_LOWER_Z);
452}
453
454/** Check if character is a digit (0-9) */
455function isDigit(c: string): boolean {

Callers 3

parseBareItemFunction · 0.85
parseTokenFunction · 0.85
serializeTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected