Site Tools


isalpha
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


isalpha [2006/07/11 04:57] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +# $EPIC: isalpha.txt,v 1.1.1.1 2006/07/11 04:57:43 jnelson Exp $
 +======Synopsis:======
 +$__isalpha__(<text>) \\
 +$__isdigit__(<text>)
 +
 +======Technical:======
 +These function test whether the first character in the given string is
 +an alphabetical character or a digit.  Only the first character is
 +tested.
 +
 +======Practical:======
 +These functions are useful for testing an input string to see whether it
 +is a number or a text string.  One use for this might be to check if it
 +would be suitable input for $[[iptoname]]() or $[[nametoip]]().  Keep in mind
 +that only the first character is tested, so this isn't a reliable way
 +to see if the entire string is a number.
 +
 +======Returns:======
 +"true" or "false" value if first character is a letter or a digit
 +
 +======Examples:======
 +<file>
 +$isalpha(hello)         returns true
 +$isalpha(2hello)        returns false
 +$isdigit(123)           returns true
 +$isdigit(2abc)          returns true
 +$isdigit(a123)          returns false
 +</file>
 +
  
isalpha.txt · Last modified: 2006/07/11 04:57 by 127.0.0.1