Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getURL(String v) {

        int site = v.indexOf("http://");
        if (site >= 0) {
            int end = v.length();
            String chars = " \n\r\t";
            for (int c = 0; c < chars.length(); c++) {
                int r = v.indexOf(chars.charAt(c), site);
                if (r >= 0 && r < end) {
                    end = r;
                }
            }
            return v.substring(site, end);
        }
        return null;

    }
}