GXSTR class¶
-
class
geosoft.gxapi.
GXSTR
¶ This library is not a class. Use the STR library functions to work with and manipulate string variables. Since the GX Programming Language does not provide string literal tokens, you must use these functions for any string operations you want to perform.
-
static
char_n
((str)arg1, (int)arg2, (int)arg3) → int:¶ Returns the ASCII value of the n'th character.
Parameters: - arg1 (str) – string
- arg2 (int) – character to get
- arg3 (int) – maximum string length (unused)
Returns: ASCII value of n’th character in string. The first character is 0.
Return type: int
New in version 5.0.0.
-
static
count_tokens
((str)arg1, (str)arg2) → int:¶ Counts number of tokens.
Parameters: - arg1 (str) – string to tokenize
- arg2 (str) – delimiter characters
Returns: Number of tokens in the string.
Return type: int
New in version 5.0.0.
Note:
Delimiters are "soft" in that one or more delimiters is considered a single delimiter, and preceding and trailing delimiters are ignored. DO NOT use this function except in GXC code. The corresponding
geosoft.gxapi.GXSTR.get_token()
function will not operate correctly in GX.Net code.
-
static
escape
((str_ref)arg1, (int)arg2) → None:¶ Convert/replace escape sequences in strings.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string to modify - arg2 (int) – STR_ESCAPE constants
Returns: Nothing
Return type: None
New in version 5.0.6.
Note:
Escape characters: a bell b backspace f formfeed n new line r carriage return t tab v vertical tab " quote character x take 'x' literally \ backslash ooo octal up to 3 characters xhh hex up to 2 characters A common use of this function is to convert double-quote characters in a user unput string to " so the string can be placed in a tokenized string.
- arg1 (
-
static
file_combine_parts
((str)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (str_ref)arg6) → None:¶ Combine file parts to build a file name.
Parameters: - arg1 (str) – drive
- arg2 (str) – directory
- arg3 (str) – name
- arg4 (str) – extension
- arg5 (str) – qualifiers
- arg6 (
geosoft.gxapi.str_ref
) – destination string, can be same as input
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
file_ext
((str)arg1, (str)arg2, (str_ref)arg3, (int)arg4) → None:¶ Add a file extension onto a file name string.
Parameters: - arg1 (str) – file name to extend
- arg2 (str) – extension if “”, extenstion and ‘.’ are stripped.
- arg3 (
geosoft.gxapi.str_ref
) – extended file name (can be same as input) - arg4 (int) – FILE_EXT constants
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
file_name_part
((str)arg1, (str_ref)arg2, (int)arg3) → None:¶ Get part of a file name.
Parameters: - arg1 (str) – file name
- arg2 (
geosoft.gxapi.str_ref
) – destination string, can be same as input - arg3 (int) – STR_FILE_PART constants
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
format_crc
((int)arg1, (str_ref)arg2, (int)arg3) → None:¶ Convert a GX CRC value to a string.
Parameters: - arg1 (int) – CRC value to format
- arg2 (
geosoft.gxapi.str_ref
) – Resulting string - arg3 (int) – Width of the field
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
format_date
((float)arg1, (str_ref)arg2, (int)arg3, (int)arg4) → None:¶ Convert a GX real to a date string.
Parameters: - arg1 (float) – date value in decimal years to format
- arg2 (
geosoft.gxapi.str_ref
) – Resulting string - arg3 (int) – Width of the field
- arg4 (int) – DATE_FORMAT constants
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
format_double
((float)arg1, (str_ref)arg2, (int)arg3, (int)arg4, (int)arg5) → None:¶ Convert a GX real to a string.
Parameters: - arg1 (float) – value to format
- arg2 (
geosoft.gxapi.str_ref
) – Resulting string - arg3 (int) – GS_FORMATS constants
- arg4 (int) – Width of the field
- arg5 (int) – Significant digits/decimals
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
format_i
((int)arg1, (str_ref)arg2, (int)arg3) → None:¶ Convert a GX int to a string.
Parameters: - arg1 (int) – value to format
- arg2 (
geosoft.gxapi.str_ref
) – Resulting string - arg3 (int) – Width of the field
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
format_r
((float)arg1, (str_ref)arg2, (int)arg3, (int)arg4) → None:¶ Convert a GX real to a string with significant digits.
Parameters: - arg1 (float) – value to format
- arg2 (
geosoft.gxapi.str_ref
) – Resulting string - arg3 (int) – Width of the field
- arg4 (int) – Significant digits
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
format_r2
((float)arg1, (str_ref)arg2, (int)arg3, (int)arg4) → None:¶ Convert a GX real to a string with given decimals.
Parameters: - arg1 (float) – value to format
- arg2 (
geosoft.gxapi.str_ref
) – Resulting string - arg3 (int) – Width of the field
- arg4 (int) – Decimals
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
format_time
((float)arg1, (str_ref)arg2, (int)arg3, (int)arg4, (int)arg5) → None:¶ Convert a GX real to a time string.
Parameters: - arg1 (float) – time value in decimal hours to format
- arg2 (
geosoft.gxapi.str_ref
) – Resulting string - arg3 (int) – Width of the field
- arg4 (int) – Decimals to format with
- arg5 (int) – TIME_FORMAT constants
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
gen_group_name
((str)arg1, (str)arg2, (str)arg3, (str_ref)arg4) → None:¶ Generate a group name string from type string, database and channel(optional) strings..
Parameters: - arg1 (str) – input type string (static part)
- arg2 (str) – input db string
- arg3 (str) – input ch string (could be 0 length)
- arg4 (
geosoft.gxapi.str_ref
) – output group name string
Returns: Nothing
Return type: None
New in version 5.1.4.
Note:
The output group name string is formed in the way of typestr_dbstr_chstr. If the database/channel strings is too long to fit the output string (max total length of 1040, including the NULL ending), then the typestr will always be kept the full length to be the first part, while the dbstr and/or chstr will be shortened to be the second and/or third part of the output string.
See also
GenNewGroupName_MVIEW
-
static
get_char
((str)arg1) → int:¶ Returns the ASCII value of a character.
Parameters: arg1 (str) – string to return ascii value of first character Returns: ASCII value of first character in string. Return type: int New in version 5.0.0.
-
static
get_m_file
((str)arg1, (str_ref)arg2, (int)arg3) → None:¶ Get the indexed filepath from a multiple filepath string
Parameters: - arg1 (str) – input multifile string
- arg2 (
geosoft.gxapi.str_ref
) – output filepath string - arg3 (int) – index of file
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The multifile string must use '|' as a delimiter. Do not pass a string after calling
geosoft.gxapi.GXSTR.tokenize()
.
-
static
get_token
((str_ref)arg1, (str)arg2, (int)arg3) → None:¶ Get a token from a tokenized string.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – destination string - arg2 (str) – tokenized string
- arg3 (int) – token number wanted (0 is the first!)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Call
geosoft.gxapi.GXSTR.tokens()
to prepare the tokenized string. You MUST NOT get tokens beyond number of tokens returned bygeosoft.gxapi.GXSTR.tokens()
orgeosoft.gxapi.GXSTR.tokens2()
. The first token has index 0. DO NOT use this function except in GXC code.geosoft.gxapi.GXSTR.get_token()
function will not operate correctly in GX.Net code.See also
geosoft.gxapi.GXSTR.tokens()
, GetToken_STR- arg1 (
-
static
justify
((str)arg1, (str_ref)arg2, (int)arg3, (int)arg4) → None:¶ Justify a string
Parameters: - arg1 (str) – string to justify
- arg2 (
geosoft.gxapi.str_ref
) – result string, can be same as input - arg3 (int) – justification width
- arg4 (int) – STR_JUSTIFY constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the string is too big to fit in the number of display characters, the output string will be "**" justified as specified.
-
static
make_alpha
((str_ref)arg1) → None:¶ Turns all non alpha-numeric characters into an _.
Parameters: arg1 ( geosoft.gxapi.str_ref
) – String to trimReturns: Nothing Return type: None New in version 5.1.8.
Note:
THE STRING IS MODIFIED.
-
static
parse_list
((str)arg1, (GXVV)arg2) → None:¶ Parse a tokenized list to get a selection list.
Parameters: - arg1 (str) – String to be parsed
- arg2 (
geosoft.gxapi.GXVV
) – Selection Buffer to fill
Returns: Nothing
Return type: None
New in version 5.0.1.
Note:
Given a list such as "1,3,4,6-9,12", it fills the input buffer with 1 if the number is selected, 0 if not. The items are delimited with spaces or commas, and ranges are acceptable, either using a "-" or ":", e.g. 3-6 and 3:6 both mean 3,4,5, and 6. Only values from 0 to one less than the buffer length are used. Out-of-range values are ignored.
-
static
printf
((str_ref)arg1, (str)arg2) → None:¶ Variable Argument PrintF function
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – destination string - arg2 (str) – pattern string
Returns: Nothing
Return type: None
New in version 7.3.0.
- arg1 (
-
static
remove_qualifiers
((str)arg1, (str_ref)arg2) → None:¶ Remove file qualifiers from a file name
Parameters: - arg1 (str) – input file name
- arg2 (
geosoft.gxapi.str_ref
) – output file name (can be same as input)
Returns: Nothing
Return type: None
New in version 7.0.1.
-
static
replace_char
((str_ref)arg1, (str)arg2, (str)arg3) → None:¶ Replaces characters in a string.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string to modify - arg2 (str) – character to replace (first character only)
- arg3 (str) – replacement character (first character only)
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the input replacement character is "", then the string will be truncated at the first character to replace.
- arg1 (
-
static
replace_char2
((str_ref)arg1, (str)arg2, (str)arg3) → None:¶ Replaces characters in a string, supports simple removal.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string to modify - arg2 (str) – character to replace (first character only)
- arg3 (str) – replacement character (first character only)
Returns: Nothing
Return type: None
New in version 6.3.0.
Note:
If the replacement character is "" (NULL character) then the character to replace is removed from the input string, and the string is shortened.
- arg1 (
-
static
replace_match_string
((str_ref)arg1, (str)arg2, (str)arg3) → None:¶ Replaces all occurances of match string by replacement string with case sensitive.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – Destination String - arg2 (str) – match string to replace
- arg3 (str) – replacement string
Returns: Nothing
Return type: None
New in version 7.0.1.
Note:
If the replacement string is "" (NULL character) then the string to replace is removed from the input string, and the string is shortened.
- arg1 (
-
static
replace_multi_char
((str_ref)arg1, (str)arg2, (str)arg3) → None:¶ Replaces multiple characters in a string.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string to modify - arg2 (str) – characters to replace
- arg3 (str) – replacement characters
Returns: Nothing
Return type: None
New in version 5.1.5.
Note:
The number of characters to replace must equal the number of replacement characters.
- arg1 (
-
static
replace_non_ascii
((str_ref)arg1, (str)arg2) → None:¶ Replace non-ASCII characters in a string.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string to modify - arg2 (str) – replacement character
Returns: Nothing
Return type: None
New in version 6.0.0.
Note:
All characthers > 127 will be replaced by the first character of the replacement string.
- arg1 (
-
static
replacei_match_string
((str_ref)arg1, (str)arg2, (str)arg3) → None:¶ Replaces all occurances of match string by replacement string with case insensitive.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – Destination String - arg2 (str) – match string to replace
- arg3 (str) – replacement string
Returns: Nothing
Return type: None
New in version 7.0.1.
Note:
If the replacement string is "" (NULL character) then the string to replace is removed from the input string, and the string is shortened.
- arg1 (
-
static
scan_date
((str)arg1, (int)arg2) → float:¶ Convert a date string to a GX real.
Parameters: - arg1 (str) – Date string
- arg2 (int) – DATE_FORMAT constants
Returns: Resulting Real, rDUMMY if conversion fails.
Return type: float
New in version 6.0.1.
Note:
OLD usage, use ScanForm_STR instead.
-
static
scan_form
((str)arg1, (int)arg2) → float:¶ Convert a formated string to a real.
Parameters: - arg1 (str) – Date string
- arg2 (int) – GS_FORMATS constants
Returns: Resulting Real, rDUMMY if conversion fails.
Return type: float
New in version 6.0.1.
-
static
scan_i
((str)arg1) → int:¶ Convert a string to a GX int.
Parameters: arg1 (str) – String to convert to an integer Returns: Resulting Integer, iDUMMY is bad integer Return type: int New in version 6.0.1.
-
static
scan_r
((str)arg1) → float:¶ Convert a string to a GX real.
Parameters: arg1 (str) – String to convert to a real Returns: Resulting Real, rDUMMY if bad string. Return type: float New in version 6.0.1.
-
static
scan_time
((str)arg1, (int)arg2) → float:¶ Convert a time string to a GX real.
Parameters: - arg1 (str) – Date string
- arg2 (int) – TIME_FORMAT constants
Returns: Resulting Real, rDUMMY if conversion fails.
Return type: float
New in version 6.0.1.
Note:
OLD usage, use ScanForm_STR instead.
-
static
set_char
((str_ref)arg1, (int)arg2) → None:¶ Set a string's first character using an ASCII value of a character.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string - arg2 (int) – ASCII value
Returns: Nothing
Return type: None
New in version 5.1.4.
- arg1 (
-
static
set_char_n
((str_ref)arg1, (int)arg2, (int)arg3) → None:¶ Set the n'th character of a string using an ASCII value
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string - arg2 (int) – character to set
- arg3 (int) – ASCII value
Returns: Nothing
Return type: None
New in version 5.1.4.
- arg1 (
-
static
split_string
((str_ref)arg1, (str)arg2, (str_ref)arg3) → None:¶ Splits a string in two on a character.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – original string - arg2 (str) – split character (first character of string)
- arg3 (
geosoft.gxapi.str_ref
) – split string past split character.
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The original string is modified by terminating it at the character split. The part of the string past the character split is copied to the split string. Split characters in quoted strings are ignored. This function is mainly intended to separate comments from control file strings.
- arg1 (
-
static
str_mask
((str)arg1, (str)arg2) → int:¶ Case sensitive comparison of two strings.
Parameters: - arg1 (str) – mask
- arg2 (str) – string to test
Returns: 0 if string does not match mask. 1 if string matches mask.
Return type: int
New in version 5.0.0.
Note:
Mask characters '*' - matches any one or more up to next character '?' - matches one character Test is case sensitive
-
static
str_min
((str_ref)arg1) → int:¶ Remove spaces and tabs and return length
Parameters: arg1 ( geosoft.gxapi.str_ref
) – string to find the min length ofReturns: String length. Return type: int New in version 5.0.0.
Note:
String may be modified. This function should not be used to determine if a file name string is defined, because a valid file name can contain spaces, and once "tested" the name will be altered. Instead, use
geosoft.gxapi.GXSTR.str_min2()
, or usegeosoft.gxapi.GXSYS.file_exist()
to see if the file actually exists.
-
static
str_min2
((str)arg1) → int:¶ Length less spaces and tabs, string unchanged.
Parameters: arg1 (str) – string to find the min length of Returns: String length. Return type: int New in version 5.0.0.
-
static
str_str
((str)arg1, (str)arg2, (int)arg3) → int:¶ Scan a string for the occurrence of a given substring.
Parameters: - arg1 (str) – string to scan
- arg2 (str) – string to look for
- arg3 (int) – STR_CASE constants
Returns: -1 if the substring does not occur in the string Index of first matching location if found
Return type: int
New in version 5.1.6.
-
static
strcat
((str_ref)arg1, (str)arg2) → None:¶ This method contatinates a string.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – Destination String - arg2 (str) – String to add
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
strcmp
((str)arg1, (str)arg2, (int)arg3) → int:¶ This method compares two strings and returns these values
Parameters: - arg1 (str) – string A
- arg2 (str) – string B
- arg3 (int) – STR_CASE constants
Returns: A < B -1 A == B 0 A > B 1
Return type: int
New in version 5.0.0.
-
static
strcpy
((str_ref)arg1, (str)arg2) → None:¶ This method copies a string into another string.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – destination string - arg2 (str) – origin string
Returns: Nothing
Return type: None
New in version 5.0.0.
- arg1 (
-
static
stri_mask
((str)arg1, (str)arg2) → int:¶ Case insensitive comparison of two strings.
Parameters: - arg1 (str) – mask
- arg2 (str) – string to test
Returns: 0 if string does not match mask. 1 if string matches mask.
Return type: int
New in version 5.0.0.
Note:
Mask characters '*' - matches any one or more up to next character '?' - matches one character Test is case insensitive
-
static
strins
((str_ref)arg1, (int)arg2, (str)arg3) → None:¶ This method inserts a string at a specified position.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – Destination String - arg2 (int) – Insert Position
- arg3 (str) – String to add
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
If the specified position does not fall within the current string the source string will simply be Concatenated.
- arg1 (
-
static
strlen
((str)arg1) → int:¶ Returns the length of a string.
Parameters: arg1 (str) – string to find the length of Returns: String length. Return type: int New in version 5.0.0.
-
static
strncmp
((str)arg1, (str)arg2, (int)arg3, (int)arg4) → int:¶ Compares two strings to a given number of characters.
Parameters: - arg1 (str) – string A
- arg2 (str) – string B
- arg3 (int) – number of characters to compare
- arg4 (int) – STR_CASE constants
Returns: A < B -1 A == B 0 A > B 1
Return type: int
New in version 5.0.5.
-
static
substr
((str_ref)arg1, (str)arg2, (int)arg3, (int)arg4) → None:¶ Extract part of a string.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – destination string - arg2 (str) – origin string
- arg3 (int) – start location
- arg4 (int) – number of characters
Returns: Nothing
Return type: None
New in version 6.2.0.
Note:
The destination string length will be less than the requested length if the substring is not fully enclosed in the origin string.
- arg1 (
-
static
to_lower
((str_ref)arg1) → None:¶ Convert a string to lower case.
Parameters: arg1 ( geosoft.gxapi.str_ref
) – StringReturns: Nothing Return type: None New in version 5.0.0.
-
static
to_upper
((str_ref)arg1) → None:¶ Convert a string to upper case.
Parameters: arg1 ( geosoft.gxapi.str_ref
) – StringReturns: Nothing Return type: None New in version 5.0.0.
-
static
tokenize
((str_ref)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5) → int:¶ Tokenize a string based on any characters.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – str - String containing token(s) - arg2 (str) – szSoft - Soft delimiters (spaces/tabs)
- arg3 (str) – szHard - Hard delimiters (commas)
- arg4 (str) – szEsc - Escape delimiters (back-slash)
- arg5 (str) – szQuote- Quote delimiters (quote characters)
Returns: number of tokens
Return type: int
New in version 5.0.0.
Note:
This uses a finite state machine to tokenize on these rules: 1. Any one character following an escape delimiter is treated as a normal character. 2. Any characters inside a quote string are treated as normal characters. 3. Any number of Soft delimiters in sequence without a hard delimiter are treated as one hard delimited. 4. Any number of soft delimiters can preceed or follow a hard delimiter and are ignored. EXAMPLE Soft = [ ] Hard = [,] Escape = [] Quote = ["] [this is a , , the "test," of , ," my delimite fi,] Results in: [this] [is] [a] [] [the] ["test,"] [of] [,"] [my] [delimite] [fi] [] NOT use this function except in GXC code. The corresponding etToken_STR function will not operate correctly in GX.Net code.
See also
GetToken_STR
- arg1 (
-
static
tokens
((str_ref)arg1, (str)arg2) → int:¶ Tokenize a string
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string to tokenize - arg2 (str) – delimiter characters
Returns: number of tokens, maximum is 2048
Return type: int
New in version 5.0.0.
Note:
Delimiters in the string are reduced to a single NULL. Delimiters withing double quoted strings are ignored. Use GetToken_STR to extract tokens. DO NOT use this function except in GXC code. The corresponding
geosoft.gxapi.GXSTR.get_token()
function will not operate correctly in GX.Net code.See also
geosoft.gxapi.GXSTR.tokens2()
, GetToken_STR- arg1 (
-
static
tokens2
((str_ref)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5) → int:¶ General tokenize a string
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – string to tokenize - arg2 (str) – szSoft - Soft delimiters (spaces/tabs)
- arg3 (str) – szHard - Hard delimiters (commas)
- arg4 (str) – szEsc - Escape delimiters (back-slash)
- arg5 (str) – szQuote- Quote delimiters (quote characters)
Returns: Number of Tokens
Return type: int
New in version 5.0.0.
Note:
This function is for old GX compatibility only. See
geosoft.gxapi.GXSTR.tokenize()
. DO NOT use this function except in GXC code. The correspondinggeosoft.gxapi.GXSTR.get_token()
function will not operate correctly in GX.Net code.- arg1 (
-
static
trim_quotes
((str_ref)arg1) → None:¶ Remove double quotes.
Parameters: arg1 ( geosoft.gxapi.str_ref
) – String to trimReturns: Nothing Return type: None New in version 5.0.0.
Note:
THE STRING IS MODIFIED. This method goes through the string and removes all spaces in a string except those enclosed in quotes. It then removes any quotes. It is usfull for trimming unwanted spaces from an input string but allows the user to use quotes as well. If a quote follows a backslash, the quote is retained and the backslash is deleted. These quotes are NOT treated as delimiters.
-
static
trim_space
((str_ref)arg1, (int)arg2) → None:¶ Remove leading and/or trailing whitespace.
Parameters: - arg1 (
geosoft.gxapi.str_ref
) – String to trim - arg2 (int) – STR_TRIM constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
THE STRING IS MODIFIED. Whitespace characters are defined as space, tab, carriage return, new line, vertical tab or formfeed (0x09 to 0x0D, 0x20)
- arg1 (
-
static
un_quote
((str_ref)arg1) → None:¶ Remove double quotes from string
Parameters: arg1 ( geosoft.gxapi.str_ref
) – String to unquoteReturns: Nothing Return type: None New in version 5.0.0.
Note:
THE STRING IS MODIFIED. The pointers will be advanced past a first character quote and a last character quote will be set to .0'. Both first and last characters must be quotes for the triming to take place.
-
static
xyz_line
((str)arg1, (str_ref)arg2) → None:¶ Make a valid XYZ line name from a valid DB line name.
Parameters: - arg1 (str) – line name to convert
- arg2 (
geosoft.gxapi.str_ref
) – buffer to hold new line name
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
FILE_EXT constants¶
Extension option
-
gxapi.
FILE_EXT_ADD_IF_NONE
= 0¶
will add the extension only if no extension is present.
-
gxapi.
FILE_EXT_FORCE
= 1¶
will cause a renaming of the file extension to the new extension.
STR_ESCAPE constants¶
How to handle escape
-
gxapi.
ESCAPE_CONVERT
= 0¶
Converts non-standard characters in a string to escape sequences.
-
gxapi.
ESCAPE_REPLACE
= 1¶
Replaces escape sequences with original characters.
STR_FILE_PART constants¶
Parts of a path string
-
gxapi.
STR_FILE_PART_NAME
= 0¶
File Name
-
gxapi.
STR_FILE_PART_EXTENSION
= 1¶
Extension
-
gxapi.
STR_FILE_PART_DIRECTORY
= 2¶
Directory
-
gxapi.
STR_FILE_PART_VOLUME
= 3¶
Drive
-
gxapi.
STR_FILE_PART_QUALIFIERS
= 4¶
Qualifiers
-
gxapi.
STR_FILE_PART_NAME_EXTENSION
= 5¶
Name and the Extension together
-
gxapi.
STR_FILE_PART_FULLPATH_NO_QUALIFIERS
= 6¶
Full name of file with no qualifiers