-1

My company just got acquired by a European company, and they represent fractions as

"7 ¼"

in their API response instead of the usual

"7 1/4"

How do I create the first format in strings? I copied the fraction from their API response but I need to map things like 7 3/4 into this weird format as well.

S3DEV
  • 8,768
  • 3
  • 31
  • 42
David Pham
  • 187
  • 1
  • 4
  • 14
  • 1
    Have you looked into the Unicode behind the fraction’s representation? A quick internet search returns several sites [like this one](https://www.alt-codes.net/fraction-symbols). It’s not a ‘weird’ format, it’s just farther down the code table. – S3DEV May 27 '22 at 19:51
  • [This SO question](https://stackoverflow.com/q/55033436/6340496) may provide some additional insight. Just translate for Python. – S3DEV May 27 '22 at 19:55

1 Answers1

0

Figured it out; on Mac, you can go to TextEdit and then hit ctrl + cmd + space to bring up the Emoji window, then search for "Fraction" and find it there.

David Pham
  • 187
  • 1
  • 4
  • 14