FoldString_

Just starting out? Need help? Post your questions and find answers here.
loulou2522
Posts: 51
Joined: Wed Mar 18, 2015 5:52 am

FoldString_

Post by loulou2522 »

Hi all
Does the api function FoldString_(#MAP_COMPOSITE ,car,1,result,1 ) which allow to transform an é in e or an ù to u exists in Spiderbasic
Thanks
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: FoldString_

Post by Peter »

In SpiderBasic there are no API commands.

Code: Select all

Procedure.s FoldString_(str.s)
  ; https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript
  ! return v_str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
EndProcedure

Debug FoldString_("Crème Brulée")
loulou2522
Posts: 51
Joined: Wed Mar 18, 2015 5:52 am

Re: FoldString_

Post by loulou2522 »

THanks Peter
Post Reply