Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Axis8048yHmm not the best way but off the top of my head I would've converted to character array iterated through it and check for the current and next character being a backslash and then only add it once to the new built up string

Me: *spends three days trying to format a string to replace two backslashes with one*
Python: Here you go!
str = bytes(str,"utf-8")
.decode("unicode_escape")
rant