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 getIPv4StringByStrippingIPv6Prefix(String in) {
        String ipv6Prefix = "::ffff:";

        if (in.startsWith(ipv6Prefix)) {
            return in.substring(ipv6Prefix.length(), in.length());
        }

        return in;
    }
}