This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
Strings

Strings 

 

Constant  Type Value Comment
sk case insensitive  Longint 2

Strings are compared according to the current data language with no consideration of capitalization differences. Note that diacritical marks are taken into consideration. For example, "A" is considered the same as "a", however "a" is not considered the same as "à" . By default, 4D string comparison is case insensitive. 

 

Can be combined with: 

  • sk char codes OR sk diacritic insensitive
  • sk whole word (Position command only)

This constant implies the use of the following constants (which can also be combined for improved readability):

  • sk kana insensitive
  • sk width insensitive
  • sk strict
sk char codes  Longint 1

Strings are compared according to character codes. Current data language settings are not taken into account during the comparison. 

 

Can be combined with: sk case insensitive 

Only for "a-z" or "A-Z" ranges. (e.g., Alpha = alpha, but Alpha # âlphà)

sk diacritic insensitive  Longint 4

Strings are compared according to the current data language, however the diacritical mark (e.g., accent or symbol) of letters is ignored. For example, "a" is considered the same as "à". 

 

Can be combined with:

  • sk case insensitive
  • sk whole word (Position command only)

This constant implies the use of the following constants (which can also be combined for improved readability):

  • sk kana insensitive
  • sk width insensitive
  • sk strict
sk ignore empty strings  Longint 1 Remove empty strings from the resulting collection (they are ignored)
sk kana insensitive  Longint 8

For Japanese language. Controls the distinction between Hiragana and Katakana syllables. From a semantic point of view, the difference between Hiragana and Katakana is usually significant, but to capture as many results as possible, the default mode in 4D is to ignore the difference (kana insensitive). For example, "あ" is considered the same as "ア". The sk strict option performs a kana sensitive comparison. sk kana insensitive can be used to partially relax the rule to be kana insensitive. 

 

Note: The data language must be set to Japanese to use this option. For all other languages, the option is ignored and Compare strings will work as if sk strict was specified. In other words, setting this option in a non-Japanese context would actually make the comparison kana sensitive (the opposite effect).

 

Can be combined with:

  • sk case insensitive
  • sk diacritic insensitive

 

This constant implies the use of the following constants (which can also be combined for improved readability): 

  • sk width insensitive
  • sk strict
sk strict  Longint 0

Strings are compared for exact matches according to the current data language. In most cases, capitalization and diacritical marks of letters are taken into account during the comparison. 

 

Can be combined with:

  • sk case insensitive
  • sk diacritic insensitive
  • sk kana insensitive

This constant implies the use of the following constant (which can also be combined for improved readability):

  • sk width insensitive
sk trim spaces  Longint 2 Trim space characters at the beginning and end of substrings
sk whole word  Longint 32

Strings are compared according to the current data language. Only strings that are complete words are considered. Matching strings within other strings are not considered. For example, "where" is not considered when found within "somewhere".

 

Can be combined with: 

  • sk case insensitive (Position command only)
  • sk diacritic insensitive (Position command only)
sk width insensitive  Longint 16

For Japanese language. Corresponds to the "East Asian Width" Unicode standard, as defined in Unicode Standard Annex #11. From a semantic point of view, the difference between a "narrow" and "wide" character or a "full width" and "half width" character is usually insignificant, which is the default mode in 4D. For example, "ア" is considered the same as "ア". The sk strict option performs a width sensitive comparison. 

 

Notes: 

  • The data language must be set to Japanese to use this option. For all other languages, the option is ignored and Compare strings will work as if sk strict was specified. In other words, setting this option in a non-Japanese context would actually make the comparison width sensitive (the opposite effect).
  • This option is ignored by the Position function. Unicode width insensitive collation is asymmetric and impossible to locate by position or length. 

 

Can be combined with:

  • sk case insensitive
  • sk diacritic insensitive
  • sk kana insensitive

This constant implies the use of the following constant (which can also be combined for improved readability):

  • sk strict


See also 

Compare strings
Position
Split string

 
PROPERTIES 

Product: 4D
Theme: List of constant themes

 
HISTORY 

Created: 4D v16 R6

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)