Difference between revisions of "CHROVERLAP()"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
 
Line 1: Line 1:
 
 
 
==Purpose==
 
==Purpose==
 
Function to test for a character existing at the same position within two strings
 
Function to test for a character existing at the same position within two strings
Line 31: Line 29:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Expressions and Type Conversion]]
 
[[Category:Expressions and Type Conversion]]
 
[[Category:Expressions and Type Conversion Functions]]
 
[[Category:Expressions and Type Conversion Functions]]

Latest revision as of 16:18, 27 November 2009

Purpose

Function to test for a character existing at the same position within two strings


Syntax

CHROVERLAP(<expC1>, <expC2> [, <expC3>])


See Also

AT(), GETGID(), GETUID(), STRCOMPARE(), STREXTRACT(), SUBSTR()


Description

The CHROVERLAP() function test for a character existing at the same position within two strings. The <expC1> defines the source string and <expC2> the test string. The CHROVERLAP() function tests each character within the test string against the equivalent character in the source string, up to the length of the source string. By default, the CHROVERLAP() function will test for the existence of the upper case letter 'Y'. The optional <expC3> can be used to test for an alternative letter. The CHROVERLAP() function returns .T. if it finds a matching occurrence of the test character within both strings.

This function is particularly useful for controlling users' access rights to modules within an application. The example below shows how users' privileges can be stored in a string and checked using the CHROVERLAP() function.


Example

cUserPrivs = "YYYNYNNY"
if chroverlap(cUserPrivs, "NNNNYNNN")
    SysMaintenanceMenu()
else
    dialog box [You are not authorized to perform this operation.]
endif


Products

Recital Server, Recital