Java Hash String hasHTMLTag(String html)

Here you can find the source of hasHTMLTag(String html)

Description

has HTML Tag

License

Apache License

Declaration

public static boolean hasHTMLTag(String html) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static boolean hasHTMLTag(String html) {
        boolean flag = false;
        if (html != null && html.length() > 0) {
            for (int i = 0; i <= html.length() - 1; ++i) {
                char c = html.charAt(i);
                switch (c) {
                case '\"':
                    flag = true;// w w w. jav a  2s .  c o  m
                    break;
                case '&':
                    flag = true;
                    break;
                case '<':
                    flag = true;
                    break;
                case '>':
                    flag = true;
                }

                if (flag) {
                    break;
                }
            }
        }

        return flag;
    }
}

Related

  1. hashString(String s)
  2. hashString(String str)
  3. hashString(String str)
  4. hashTermToString(int i, int h)
  5. hasHtmlTag(String content)
  6. hasHTMLTag(String text)
  7. hashToHexString(byte[] hash)
  8. hashToString(byte hash[])
  9. hasHttp(String url)