of_countoccurrences


pfcapsrv.pbl   >   pfc_n_cst_string   >   of_countoccurrences   

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

Name Datatype
No Data

Name Datatype
ll_Count Long
ll_null long

public function long of_countoccurrences (string as_source, string as_target);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_CountOccurrences
//
//	Access:  		public
//
//	Arguments:
//	as_Source		The string in which to search.
//	as_Target		The string to search for.
//
//	Returns: 		long
//						The number of occurrences of as_Target in as_source.
//						If any argument's value is NULL, function returns NULL.
//
//	Description:  	Count the occurrences of one string within another.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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

//Check for parameters
If IsNull(as_source) or IsNull(as_target) Then
	long ll_null
	SetNull(ll_null)
	Return ll_null
End If

//Default is to ignore case.
ll_Count = of_CountOccurrences (as_source, as_target, True)

Return ll_Count

end function

     
Name Owner
pfc_n_cst_error.of_processmessagesubstitution pfc_n_cst_error

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.setnull systemfunctions
pfc_n_cst_string.of_countoccurrences pfc_n_cst_string

     
Full name
No Data

     
Name Scope
No Data