問題タブ [string-escape]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
88 参照

java - Javaで文字列をエスケープする必要があるかどうかを確認する方法

エスケープメカニズムを実際に実行する前に、特定の文字列をエスケープする必要があるかどうかを確認したいと思います。たとえば、文字列が"msg\t" なのでエスケープしたいが、文字列が"msg\\t" すでにエスケープされていることを意味している場合、または "msg" はまったくエスケープする必要がないことを意味します。

簡単に確認する方法はありますか?