|
of_isalphanum
|
|
Full name
|
pfc_n_cst_string.of_isalphanum
|
Access
|
public
|
Extend of
|
boolean
|
Return value
|
boolean
|
Prototype
|
public function boolean of_isalphanum(string)
|
Name
|
Datatype
|
lb_null
|
boolean
|
lc_char
|
char[]
|
li_ascii
|
integer
|
ll_count
|
long
|
ll_length
|
long
|
public function boolean of_isalphanum (string as_source);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_IsAlphaNum
//
// Access: public
//
// Arguments:
// as_source The source string.
//
// Returns: Boolean
// True if the string only contains alphabetic and Numeric
// characters.
// If any argument's value is NULL, function returns NULL.
//
// Description: Determines whether a string contains only alphabetic and
// numeric characters.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
long ll_count=0
long ll_length
char lc_char[]
integer li_ascii
//Check parameters
If IsNull(as_source) Then
boolean lb_null
SetNull(lb_null)
Return lb_null
End If
//Get the length
ll_length = Len (as_source)
//Check for at least one character
If ll_length=0 Then
Return False
End If
//Move string into array of chars
lc_char = as_source
//Perform loop around all characters.
//Quit loop if Non Alphanemeric character is found.
do while ll_count57 and li_ascii<65) or &
(li_ascii>90 and li_ascii<97) or li_ascii>122 then
/* Character is Not an AlphaNumeric */
Return False
end if
loop
// Entire string is AlphaNumeric.
return True
end function
Name
|
Owner
|
systemfunctions.asc |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|