of_padright


pfcapsrv.pbl   >   pfc_n_cst_string   >   of_padright   

Full name pfc_n_cst_string.of_padright
Access public
Extend of string
Return value string
Prototype public function string of_padright(string,long)

Name Datatype
No Data

Name Datatype
ls_null string
ls_return string

public function string of_padright (string as_source, long al_length);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_PadRight
//
//	Access:  		public
//
//	Arguments:
//	as_Source		The string being searched.
//	al_length		The desired length of the string.
//
//	Returns:  		String
//						A string of length al_length wich contains as_source with
//						spaces added to its right.
//						If any argument's value is NULL, function returns NULL.
//						If al_length is less or equal to length of as_source, the 
//						function returns the original as_source.
//
//	Description:  	Pad the original string with spaces on its right to make it of
//					   the desired length.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

string	ls_return

//Check for Null Parameters.
IF IsNull(as_source) or IsNull(al_length) Then
	string ls_null
	SetNull(ls_null)
	Return ls_null
End If

//Check for the lengths
If al_length <= Len(as_Source) Then
	//Return the original string
	Return as_source
End If

//Create the right padded string
ls_return = as_source + space(al_length - Len(as_Source))

//Return the right padded string
Return ls_return
end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.len systemfunctions
systemfunctions.setnull systemfunctions
systemfunctions.space systemfunctions

     
Full name
No Data

     
Name Scope
No Data