|
of_removenonprint
|
|
Full name
|
pfc_n_cst_string.of_removenonprint
|
Access
|
public
|
Extend of
|
string
|
Return value
|
string
|
Prototype
|
public function string of_removenonprint(string)
|
Name
|
Datatype
|
lch_char
|
char
|
ll_loop
|
long
|
ll_pos
|
long
|
ll_source_len
|
long
|
ls_null
|
string
|
ls_source
|
string
|
public function string of_removenonprint (string as_source);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_RemoveNonPrint
//
// Access: public
//
// Arguments:
// as_source The string from which all nonprint characters are to
// be removed.
//
// Returns: string
// as_source with all desired characters removed.
// If any argument's value is NULL, function returns NULL.
//
// Description: Removes all nonprint 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.
//
//////////////////////////////////////////////////////////////////////////////
char lch_char
long ll_pos = 1
long ll_loop
string ls_source
long ll_source_len
//Check parameters
If IsNull(as_source) Then
string ls_null
SetNull(ls_null)
Return ls_null
End If
ls_source = as_source
ll_source_len = Len(ls_source)
// Remove nonprintable characters
FOR ll_loop = 1 TO ll_source_len
lch_char = Mid(ls_source, ll_pos, 1)
if of_IsPrintable(lch_char) then
ll_pos ++
else
ls_source = Replace(ls_source, ll_pos, 1, "")
end if
NEXT
Return ls_source
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.mid |
systemfunctions
|
systemfunctions.replace |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|
pfc_n_cst_string.of_isprintable |
pfc_n_cst_string
|