vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

java_string.java (634B)


      1 class StringTests
      2 {
      3 	static {
      4 		String s1 = "A quick brown fox jumps over the lazy dog";
      5 		String s2 = "\"Woof\s!\"";
      6 		String s3 = """
      7 			A\s\
      8 			quick \
      9 			brown\s\
     10 			fox \
     11 			jumps\s\
     12 			over \
     13 			the\s\
     14 			lazy \
     15 			dog""";
     16 		String s4 = """
     17 			"Woof\s!\"""";
     18 		String s5 = """
     19 		String s3 = \"""
     20 			A\\s\\
     21 			quick \\
     22 			brown\\s\\
     23 			fox \\
     24 			jumps\\s\\
     25 			over \\
     26 			the\\s\\
     27 			lazy \\
     28 			dog\""";""";
     29 
     30 		// There are SPACE, FF, HT, CR, and LF after """.
     31 		String empty = """ 	
     32 			""";
     33 
     34 		System.out.println("""
     35 		"
     36 		""
     37 		""\u005c"
     38 		""\u005c""
     39 		""\"\u0022\u0022
     40 		""\"""\u005c\u0022
     41 		""\"""\""
     42 		""\"""\""\"""");
     43 	}
     44 }