[
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_AscPos()",
    "CATEGORY": "String Tools",
    "ONELINER": "Return the ASCII value of a specified character in a string",
    "SYNTAX": "gt_AscPos( <cStr>, <nPos> ) --> nAscVal",
    "ARGUMENTS": "<cStr>    - The string\n\n<nPos>    - The position in <cStr>",
    "RETURNS": "<nAscVal> - The ASCII value of `hb_BSubStr( <cStr>, <nPos>, 1 )`",
    "DESCRIPTION": "Return the ASCII value of a specified character in a string\nEquivalent (but much faster) to\n```\nhb_BCode( hb_BSubStr( cStr, nPos, 1 ) )\n```\n\nNOTE:\n   invalid parameters will return -1\n   `nPos > hb_BLen( cStr )` will return -2\n\nThis last behaviour is different to the Funcky function of the\nsame name.  I changed the behaviour because some of the strings\nI process contain embedded NULs.",
    "EXAMPLES": "? hb_BChar( gt_AscPos( \"the cat sat on the mat\", 3 ) )  // --> \"e\"",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_AsciiSum()",
    "CATEGORY": "String Tools",
    "ONELINER": "Sum the ASCII values in a string.",
    "SYNTAX": "gt_AsciiSum( <cStr> ) --> nSum",
    "ARGUMENTS": "<cStr> - The string to sum",
    "RETURNS": "<nSum> - The sum of all ASCII values in <cStr>.",
    "DESCRIPTION": "Sum the ASCII value of every character in the passed string\nand return the result.",
    "EXAMPLES": "",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_AtDiff()",
    "CATEGORY": "String Tools",
    "ONELINER": "Return the position where two strings begin to differ",
    "SYNTAX": "gt_AtDiff( <cStr1>, <cStr2> ) --> nPos",
    "ARGUMENTS": "<cStr1> - A character string to compare\n\n<cStr2> - The string to compare with",
    "RETURNS": "<nPos>  - The position in <cStr2> where <cStr1> begins to differ",
    "DESCRIPTION": "Return the position in <cStr2> where <cStr1> begins to differ.\nIf the strings differ in the first character gt_AtDiff() will\nreturn 1.  If the two strings are identical (or identical up to\nthe last character in <cStr2>) the function will return 0.\n\nNOTE:\n   invalid parameters will return -1",
    "EXAMPLES": "? gt_AtDiff( \"the cat\", \"the rat\" )  // --> 5\n? gt_AtDiff( \"the cat\", \"the \" )     // --> 0",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_CharEven()",
    "CATEGORY": "String Tools",
    "ONELINER": "Return a string of all the characters in even positions",
    "SYNTAX": "gt_CharEven( <cStr> ) --> cRet",
    "ARGUMENTS": "<cStr> - A character string to extract chars from",
    "RETURNS": "<cRet> - A string of all the chars in even positions",
    "DESCRIPTION": "Return a string consisting of all the characters in even\npositions in <cStr1>.\n\nNOTE:\n   invalid parameters will return \"\"",
    "EXAMPLES": "? gt_CharEven( \"abcdefghijklm\" )  // --> \"bdfhjl\"",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_CharMix()",
    "CATEGORY": "String Tools",
    "ONELINER": "Amalgamate two strings to form the return value",
    "SYNTAX": "gt_CharMix( <cStr1>, <cStr2> ) --> cRet",
    "ARGUMENTS": "<cStr1> - A character string to mix\n\n<cStr2> - A character string to mix with",
    "RETURNS": "<cRet>  - A string consisting of all the characters in <cStr1>\n          mixed with all the characters in <cStr2>",
    "DESCRIPTION": "Return a string consisting of all the characters in <cStr1>\nmixed with the characters from <cStr2>.\n\nNOTE:\n   invalid parameters will return \"\"",
    "EXAMPLES": "? gt_CharMix( \"abc\", \"123\" )    // --> \"a1b2c3\"\n? gt_CharMix( \"abcde\", \"123\" )  // --> \"a1b2c3de\"\n? gt_CharMix( \"abc\", \"12345\" )  // --> \"a1b2c345\"",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_CharOdd()",
    "CATEGORY": "String Tools",
    "ONELINER": "Return a string of all the characters in odd positions",
    "SYNTAX": "gt_CharOdd( <cStr> ) --> cRet",
    "ARGUMENTS": "<cStr> - A character string to extract chars from",
    "RETURNS": "<cRet> - A string of all the chars in odd positions",
    "DESCRIPTION": "Return a string consisting of all the characters in odd\npositions in <cStr1>.\n\nNOTE:\n   invalid parameters will return \"\"",
    "EXAMPLES": "? gt_CharOdd( \"abcdefghijklm\" )  // --> \"acegikm\"",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_ChrCount()",
    "CATEGORY": "String Tools",
    "ONELINER": "Count the number of times a character appears in a string",
    "SYNTAX": "gt_ChrCount( <cChr>, <cStr> ) --> nFreq",
    "ARGUMENTS": "<cChr>  - The character to find the frequency of\n\n<cStr>  - The string in which to find the character",
    "RETURNS": "<nFreq> - The number of times <cChr> occurs in <cStr>",
    "DESCRIPTION": "gt_ChrCount() counts how many times a specified character\nappears in a string.\n\nNOTE:\n   invalid parameters will return -1",
    "EXAMPLES": "? gt_ChrCount( \"t\", \"the cat sat on the mat\" )  // --> 4",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_ChrFirst()",
    "CATEGORY": "String Tools",
    "ONELINER": "Find which character occurs first in a string",
    "SYNTAX": "gt_ChrFirst( <cChars>, <cStr> ) --> nAsc",
    "ARGUMENTS": "<cChars> - The set of characters to find\n\n<cStr>   - The input string",
    "RETURNS": "<nAsc>   - The ASCII value of the first character in <cChars>\n           which appears first in <cStr>",
    "DESCRIPTION": "Return the ASCII value of a character in <cChars>\nwhich appears first in <cStr>.",
    "EXAMPLES": "? hb_BChar( gt_ChrFirst( \"sa \", \"This is a test\" ) )  // --> \"s\"\n? hb_BChar( gt_ChrFirst( \"et\" , \"This is a test\" ) )  // --> \"t\"",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_ChrTotal()",
    "CATEGORY": "String Tools",
    "ONELINER": "Find number of times a set of characters appears in a string",
    "SYNTAX": "gt_ChrTotal( <cChrs>, <cStr> ) --> nTotOcc",
    "ARGUMENTS": "<cChrs>   - The set of characters\n\n<cStr>    - The string to search",
    "RETURNS": "<nTotOcc> - The number of times the characters specified in\n            <cChrs> appears in <cStr>",
    "DESCRIPTION": "Returns the number of occurrences of characters belonging\nto the set <cChrs> in the string <cStr>.  If no characters\nin <cChrs> appears in <cStr> gt_ChrTotal() will return 0.\n\nNOTE:\n   invalid parameters will return -1",
    "EXAMPLES": "LOCAL cString := \"the cat sat on the mat\"\n\n? gt_ChrTotal( \"tae\", cString )  // --> 10\n? gt_ChrTotal( \"zqw\", cString )  // --> 0",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_StrCount()",
    "CATEGORY": "String Tools",
    "ONELINER": "Count the number of times a substring appears in a string",
    "SYNTAX": "gt_StrCount( <cChrs>, <cStr> ) --> nFreq",
    "ARGUMENTS": "<cChrs> - The substring to find the frequency of\n\n<cStr>  - The string in which to find the character",
    "RETURNS": "<nFreq> - The number of times <cChrs> occurs in <cStr>",
    "DESCRIPTION": "gt_StrCount() counts how many times a specified substring\nappears in a string.\nIf the substring does NOT appear in <cStr> this function\nwill return 0.\nIf the substring is a single character use gt_ChrCount() as\nit will be faster.\n\nNOTE:\n   invalid parameters will return -1",
    "EXAMPLES": "? gt_StrCount( \"the\", \"the cat sat on the mat\" )  // --> 2",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_StrCSPN()",
    "CATEGORY": "String Tools",
    "ONELINER": "Return length of prefix in string of chars NOT in set.",
    "SYNTAX": "gt_StrCSPN( <cString>, <cSet> ) --> nLength",
    "ARGUMENTS": "<cString> - The string to find the prefix in\n\n<cSet>    - The set of characters",
    "RETURNS": "<nLength> - The length of a string up to a character in the set",
    "DESCRIPTION": "Return the number of characters in the leading segment of a\nstring that consists solely of characters NOT in the set.",
    "EXAMPLES": "? gt_StrCSPN( \"this is a test\", \"as \" )     // --> 3\n? gt_StrCSPN( \"this is a test\", \"elnjpq\" )  // --> 11",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_StrDiff()",
    "CATEGORY": "String Tools",
    "ONELINER": "Return a string where it begins to differ from another",
    "SYNTAX": "gt_StrDiff( <cStr1>, <cStr2> ) --> cRet",
    "ARGUMENTS": "<cStr1>  - A character string to compare\n\n<cStr2>  - The string to compare with",
    "RETURNS": "<cRet>   - A string beginning at the position in <cStr2> where\n           <cStr1> begins to differ from <cStr1>",
    "DESCRIPTION": "Return a string beginning at the position in <cStr2> where\n<cStr1> begins to differ from <cStr1>. If the two strings are\nidentical (or identical up to the last character in <cStr2>)\nthe function will return \"\".\n\nNOTE:\n   invalid parameters will return \"\"",
    "EXAMPLES": "? gt_StrDiff( \"the cat\", \"the rat\" )  // --> \"rat\"\n? gt_StrDiff( \"the cat\", \"the \" )     // --> \"\"",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_StrExpand()",
    "CATEGORY": "String Tools",
    "ONELINER": "Insert fillers between characters in a passed string",
    "SYNTAX": "gt_StrExpand( <cStr>, [<nNum>], [<cChar>] ) --> cRet",
    "ARGUMENTS": "<cStr1> - A character string to insert chars into\n\n<nNum>  - The number of fill characters to insert (default 1)\n\n<cChar> - The fill character (default space)",
    "RETURNS": "<cRet>  - The input string with fill characters inserted between\n          every character in the original.",
    "DESCRIPTION": "Inserts fill characters into a string.\n\nNOTE:\n   invalid parameters will return \"\"",
    "EXAMPLES": "? gt_StrExpand( \"abc\" )          // --> \"a b c\"\n? gt_StrExpand( \"abc\", 2 )       // --> \"a  b  c\"\n? gt_StrExpand( \"abc\", 2, '|' )  // --> \"a||b||c\"",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_StrLeft()",
    "CATEGORY": "String Tools",
    "ONELINER": "Find length of prefix of a string",
    "SYNTAX": "gt_StrLeft( <cStr>, <cChars> ) --> nLen",
    "ARGUMENTS": "<cStr>   - The input string\n\n<cChars> - The set of characters to find",
    "RETURNS": "<nLen>   - The length of the prefix found.",
    "DESCRIPTION": "Return the length of the leading segment in the passed string\n<cStr> that consists solely of the characters in the character\nset <cChars>.\n\nIf no characters in the the search set are found, the function\nshall return 0",
    "EXAMPLES": "? gt_StrLeft( \"this is a test\", \"hsit \" )  // --> 8\n? gt_StrLeft( \"this is a test\", \"hit a\" )  // --> 3\n? gt_StrLeft( \"this is a test\", \"zxy\" )    // --> 0",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_StrPBRK()",
    "CATEGORY": "String Tools",
    "ONELINER": "Return string after 1st char from a set",
    "SYNTAX": "gt_StrPBRK( <cStr>, <cSet> ) --> cString",
    "ARGUMENTS": "<cStr>    - The input string\n\n<cSet>    - The set of characters to find",
    "RETURNS": "<cString> - The input string after the first occurrence of any\n            character from <cSet>",
    "DESCRIPTION": "Return a string after the first occurrence of any character from\nthe input set <cSet>.",
    "EXAMPLES": "? gt_StrPBRK( \"This is a test\", \"sa \" )  // --> \"s is a test\"\n? gt_StrPBRK( \"This is a test\", \"et\" )   // --> \"test\"",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_StrRight()",
    "CATEGORY": "String Tools",
    "ONELINER": "Find length of a suffix of a string",
    "SYNTAX": "gt_StrRight( <cStr>, <cChars> ) --> nLen",
    "ARGUMENTS": "<cStr>   - The input string\n\n<cChars> - The set of characters to find",
    "RETURNS": "<nLen>   - The length of the prefix found.",
    "DESCRIPTION": "Return the length of the trailing segment in the passed string\n<cStr> that consists solely of the characters in the character\nset <cChars>.\n\nIf no characters in the the search set are found, the function\nshall return 0",
    "EXAMPLES": "? gt_StrRight( \"this is a test\", \"teas \" )  // --> 8\n? gt_StrRight( \"this is a test\", \"tes h\" )  // --> 5\n? gt_StrRight( \"this is a test\", \"zxy\" )    // --> 0",
    "STATUS": "R",
    "COMPLIANCE": "NA",
    "PLATFORMS": "",
    "FILES": "Library is hbgt"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_NewFlag()",
    "CATEGORY": "General",
    "ONELINER": "Create a new bit flag string.",
    "SYNTAX": "gt_NewFlag( <nFlagCount> ) --> cFlagString",
    "ARGUMENTS": "<nFlagCount> is the number of flags you wish to store.",
    "RETURNS": "A string to hold the bit flags. All flags are set to FALSE.",
    "DESCRIPTION": "gt_NewFlag() is used to construct a bit flag string. The bit flag\nfunctions can be used for storing a large number of logical values\nin a small space.\n\nTo create a bit flag string you need to pass gt_NewFlag() a value\nthat is equal to or greater than the number of flags required (you\nmay want to allow for future expansion). Each character in the\nstring returned from gt_NewFlag() will hold 8 logical values.",
    "EXAMPLES": "? hb_StrToHex( gt_NewFlag( 20 ) )  // Create a bit flag string for 20 logical values.",
    "SEEALSO": "gt_SetFlag(), gt_ClrFlag(), gt_IsFlag()"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_SetFlag()",
    "CATEGORY": "General",
    "ONELINER": "Set a number of flags to TRUE in a bit flag string.",
    "SYNTAX": "gt_SetFlag( <cFlagString>, [<nStart>], [<nEnd>] ) --> cFlagString",
    "ARGUMENTS": "<cFlagString> is a bit flag string created with gt_NewFlag()\n\n<nStart> is the starting flag. This is an optional numeric value.\nIf not supplied it defaults to 1.\n\n<nEnd> is the ending flag. This is an optional numeric value. If\nnot supplied it defaults to <nStart>.",
    "RETURNS": "The bit map string with the new flag settings.",
    "DESCRIPTION": "gt_SetFlag() is used to turn flags within the flag string on.",
    "EXAMPLES": "LOCAL cFlags := gt_NewFlag( 20 )  // Create a bit flag string for 20\n// logical values.\n\n// Now set flags 10 to 15 to true.\n? hb_StrToHex( cFlags := gt_SetFlag( cFlags, 10, 15 ) )\n\n// And set flag 18 to true.\n? hb_StrToHex( cFlags := gt_SetFlag( cFlags, 18 ) )\n\n// And set flag 1 to true.\n? hb_StrToHex( cFlags := gt_SetFlag( cFlags ) )",
    "SEEALSO": "gt_NewFlag(), gt_ClrFlag(), gt_IsFlag()"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_ClrFlag()",
    "CATEGORY": "General",
    "ONELINER": "Set a number of flags to FALSE in a bit flag string.",
    "SYNTAX": "gt_ClrFlag( <cFlagString>, [<nStart>], [<nEnd>] ) --> cFlagString",
    "ARGUMENTS": "<cFlagString> is a bit flag string created with gt_NewFlag()\n\n<nStart> is the starting flag. This is an optional numeric value.\nIf not supplied it defaults to 1.\n\n<nEnd> is the ending flag. This is an optional numeric value. If\nnot supplied it defaults to <nStart>.",
    "RETURNS": "The bit map string with the new flag settings.",
    "DESCRIPTION": "gt_ClrFlag() is used to turn flags within the flag string off.",
    "EXAMPLES": "LOCAL cFlags := gt_NewFlag( 20 )  // Create a bit flag string for 20\n// logical values.\n\n// Now, turn them all on.\n? hb_StrToHex( cFlags := gt_SetFlag( cFlags, 1, 20 ) )\n\n// Now set flags 10 to 15 to false.\n? hb_StrToHex( cFlags := gt_ClrFlag( cFlags, 10, 15 ) )\n\n// And set flag 18 to false.\n? hb_StrToHex( cFlags := gt_ClrFlag( cFlags, 18 ) )\n\n// And set flag 1 to false.\n? hb_StrToHex( cFlags := gt_ClrFlag( cFlags ) )",
    "SEEALSO": "gt_NewFlag(), gt_SetFlag(), gt_IsFlag()"
  },
  {
    "_COMPONENT": "hbgt",
    "_LANG": "en",
    "_DOCSOURCE": "./hbgt/doc/en/hbgt.txt",
    "NAME": "gt_IsFlag()",
    "CATEGORY": "General",
    "ONELINER": "Test the setting of a flag in a bit flag string.",
    "SYNTAX": "gt_IsFlag( <cFlagString>, [<nFlag>] ) --> lSetting",
    "ARGUMENTS": "<cFlagString> is a bit flag string created with gt_NewFlag()\n\n<nFlag> is the flag to be tested.",
    "RETURNS": "A boolean value, TRUE if the flag is on, FALSE if it's off.",
    "DESCRIPTION": "gt_IsFlag() is used to test the state of a flag with a bit flag\nstring.",
    "EXAMPLES": "// Print the setting of the flags in a flag string called <cDave>\nLOCAL nFlag\nFOR nFlag := 1 TO hb_BLen( cDave ) * 8\n   ? \"Flag number\", nFlag, \"==\", gt_IsFlag( cDave, nFlag )\nNEXT",
    "SEEALSO": "gt_NewFlag(), gt_SetFlag(), gt_ClrFlag()"
  }
]
