Recent

Author Topic: [Solved] Uppercase character control  (Read 520 times)

loaded

  • Hero Member
  • *****
  • Posts: 824
[Solved] Uppercase character control
« on: March 02, 2022, 07:38:16 am »
Hi All
Is there a ready-made method to check that the string is all unicode capital letters?
Or should we create it ourselves?
« Last Edit: March 02, 2022, 08:48:01 am by loaded »
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

Zvoni

  • Hero Member
  • *****
  • Posts: 2315
Re: Uppercase character control
« Reply #1 on: March 02, 2022, 08:21:09 am »
https://lazarus-ccr.sourceforge.io/docs/lazutils/lazutf8/utf8uppercase.html
Code: Pascal  [Select][+][-]
  1. Uses LazUTF8;
  2. Var
  3.    s:String;
  4. Begin
  5.    s:='SOME UNICODE STRING WITH ÄÄÖÖÜÜ';
  6.    If s=UTF8UpperCase(s, 'de') Then Writeln('Yes');
  7. End;
  8.  
« Last Edit: March 02, 2022, 08:59:08 am by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

loaded

  • Hero Member
  • *****
  • Posts: 824
Re: Uppercase character control
« Reply #2 on: March 02, 2022, 08:47:46 am »
This is a very nice solution;
You saved me a lot of trouble, thank you very much Zvoni
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

 

TinyPortal © 2005-2018