|
of_isprintable
|
|
Full name
|
pfc_n_cst_string.of_isprintable
|
Access
|
public
|
Extend of
|
boolean
|
Return value
|
boolean
|
Prototype
|
public function boolean of_isprintable(string)
|
Name
|
Datatype
|
lb_null
|
boolean
|
lc_char
|
char[]
|
li_ascii
|
integer
|
ll_count
|
long
|
ll_length
|
long
|
public function boolean of_isprintable (string as_source);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_IsPrintable
//
// Access: public
//
// Arguments:
// as_source The source string.
//
// Returns: Boolean
// True if the string only contains Printable characters.
// If any argument's value is NULL, function returns NULL.
//
// Description: Determines whether a string is composed entirely of
// Printable 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 NonPrintable character is found
do while ll_count126 then
/* Not a printable character */
Return False
end if
loop
// Entire string is of printable characters.
return True
end function
Name
|
Owner
|
systemfunctions.asc |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|