Java String Translate translate(String source)

Here you can find the source of translate(String source)

Description

translate

License

Open Source License

Declaration

protected static String translate(String source) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    protected static String translate(String source) {
        // format a string for HTML...
        String target = source;//  w ww  .j av a 2 s  . c  o m
        return target.replace("<", "&lt;").replace(">", "&gt;");
    }
}

Related

  1. translate(String s)
  2. translate(String s)
  3. translate(String s, String identifier, String associator)
  4. translate(String s, String oldChars, String newChars)
  5. translate(String sequence, String match, String replacement)
  6. translate(String str, String searchChars, String replaceChars)
  7. translate(String str, String searchChars, String replaceChars)
  8. translate(String str, String searchChars, String[] replaceStrings)
  9. translate(String str, String string_in, String string_out)