Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
Javascript string.length returns different value for the same string

I came across a strange issue in javascript, Two strings which looks alike returns different length value.

When I try to delete the one of the strings char one by one, the special character in the string seems to be treated as two characters while the other string special character is treated as a single character.

"Čerbák" === "Čerbák" // returns false

"Čerbák".length // 8

"Čerbák".length // 6

Due to this issue I'm seeing duplicate strings in one of my UI components. Is there any way to treat both strings as same value?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!