Compound string functions

Joe

Administrator
Staff member
FoxPro:
* 1. get at the array element
* 2. alltrim
* 3. take left 6
* 4. upper
* 5. compare
Upper(Left(Alltrim(.oCurParms.aParms[n, 1]), 6)) = "GLOBAL"
C#:
CurParms.aParms[n].ParmNm.Length >= 6 && CurParms.aParms[n].ParmNm.Trim().ToUpper().Substring(0, 6).Equals("GLOBAL")
// 0. len of string >= 6 to avoid overflow error!
// 1. get at array element
// 2. trim
// 3. upper
// 4. take substring from beginning for len of 6
// 5. compare (takes care of left 6)
// ParmNm = first column of array in Fox
 
Last edited:
Top