What do these special characters mean in Java?

前端 未结 3 1044
难免孤独
难免孤独 2020-12-10 04:32

I was looking at some of the jdk code. I found these characters. Could someone explain to me what do these mean.

public static String quote(String s) {
    i         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 05:09

    Well, \Q and \E have a special meaning in Java regular expressions...

    Most of this method is just working on the tricky edge case of quoting the quote markers \Q and \E themselves.

提交回复
热议问题