0

Is there a lodash function that would transform "répété" => "RÉPÉTÉ" instead of "REPETE" as it's done by the uppercase function?

If not, what's an easy way to perform this in Javascript?

Simon
  • 6,025
  • 7
  • 46
  • 98

2 Answers2

2

Well you have a native function called "toLocaleUpperCase()"

you can do this:

const str = 'répété';
const ret = str.toLocaleUpperCase();
alert(ret);

docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase

Bogdan M.
  • 2,161
  • 6
  • 31
  • 53
1

You could use toLocaleUpperCase()

const str = 'répété';
const ret = str.toLocaleUpperCase();
console.log(ret);
mr hr
  • 3,162
  • 2
  • 9
  • 19