|
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
|
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