TransWikia.com

Arrows in API strings?

Stack Overflow Asked by VicHofs on November 6, 2020

So this is probably as straightforward a question as can be. I’m using an API in my React project and it returns strings in many cases. However, I noticed that the longer texts have strange arrows in them (image below) and I have no idea what they are, so I can’t even format the text properly. Does anyone know what this is about? Thanks!

Just to be clear, I drew the blue square myself, it's not part of the arrow

One Answer

I've found the solution
It's because there is a weird and non-standard character instead of white space in your string.
The code below will fix your problem :)

const fixedString = yourString.replace(String.fromCharCode(12)," ")

Correct answer by Shawn Vn on November 6, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP