net.java

来自「CroftSoft Code Library是一个开源的可移植的纯Java游戏库」· Java 代码 · 共 39 行

JAVA
39
字号
     package com.croftsoft.core.net;

     import com.croftsoft.core.lang.*;
     
     /*********************************************************************
     * <P>
     * A collection of constants and static methods to supplement
     * the java.net package.
     * <P>
     * @version
     *   1997-04-18
     * @author
     *   <A HREF="http://www.alumni.caltech.edu/~croft">David W. Croft</A>
     *********************************************************************/

     public final class  Net {
     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////

     /*********************************************************************
     * Removes everything between bracket pairs plus the brackets.
     *********************************************************************/
     public static final String  strip_HTML_tags ( String  s ) {
     //////////////////////////////////////////////////////////////////////
       String  stripped = new String ( s );
       int  index = -1;
       int  end_index;
       while ( ( index = stripped.indexOf ( '<' ) ) >= 0 ) {
         if ( ( end_index = stripped.indexOf ( '>', index ) ) >= 0 ) {
           stripped = StringLib.remove ( stripped, index, end_index );
         } else break;
       }
       return stripped;
     }

     //////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////
     }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?