Java tutorial
//package com.java2s; /** * FemtoUtil<br> * * @author Takahiro Iwase * @license Apache License 2.0 */ public class Main { public static final String replaceKeyString(String key) { if (key == null) return "null"; key = key.replaceAll("\r\n", "<femtobr>"); key = key.replaceAll("\r", "<femtobr>"); key = key.replaceAll("\n", "<femtobr>"); key = key.replaceAll("\t", "<femtotab>"); return key; } }