Backslash in java

前端 未结 4 1160
北海茫月
北海茫月 2021-01-21 13:57

I have a problem with strings saved in a database, like this for example: \"311\\315_316\\336_337\". They have only one backslash and this is a problem in java. Wh

4条回答
  •  后悔当初
    2021-01-21 14:52

    You could also use Unicode \ = \u005c

    Example: "Folder\u005cSubfolder1\u005cSubfolder2"

    Would result in the string "Folder\Subfolder1\Subfolder2"

    You can see the full table here: http://jrgraphix.net/r/Unicode/0020-007F

提交回复
热议问题