[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1471
  • Last Modified:

What does VbStrConv.LinguisticCasing do?

In VB.NET there is a method  StrConv, which among other things can make all the letters in a string capitals or lower case, or the capitalize the first letter of every word in a sentence.  It also has an enumerated parameter of VbStrConv.LinguisticCasing, which must be used in combination with VbStrConv.Lowercase or VbStrConv.Uppercase.

What does adding LinguisticCasing to Uppercase or LowerCase actually do?
The Microsoft doc. only says, "Converts the string from file system rules for casing to linguistic rules."
What does that mean?
0
draxfelton
Asked:
draxfelton
1 Solution
 
SamuraikenCommented:
Members of the "String" class can either do an ordinal or linguistic operation on an object that is a String.  "Ordinal" just means that it performs actions on the numerical value of each character in the string (ascii number, for example "a = 97" and "A = 65", it's the descimal/ascii value of a character).  A "Linguistic" operation performs actions on the string value, but it also uses "culture-specific" casing (ie, sorting, casing, and formatting...ie: arabic, japanese, chinese, all have different sorting, casing, and formatting for each character).  

A good way to look at it, is that in japanese, you don't have "a b c d e f g h i j k", etc.  You have "a i u e o ka ki ku ke ko sa shi su se so".  Sorting in a roman character system is done alphabetically..."a, b, c, d, e, f".  

Sorting in japanese (i use this as an example because i speak fluent japanese) is done with the vowels first (a i u e o), followed by the other characters (which are all consonant + vowel).  But they don't have all of the consonants that we do so the sorting is different.  Generally, after the 5 vowels, you have K+vowel (Ka ki ku ke ko) followed by S+vowel (Sa shi su se so), etc on through the 52 basic characters in the alphabet.  

Linguistic operations execute within the explicit/implicitly declared culture format.  

You can look up "CultureInfo..::..CurrentCulture" topic in the MSDN for a better understanding of it.  

A tip on the Casing part, is that casing rules determine how to change a unicode character between one case and another (which you already know, upper/lower case).  However you don't have upper/lower case in Japanese, so the casing is different.  

This is the only way i know how to explain it, as i had to learn it by myself.  Hope this helps.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now