Here you can find the source of getPortNameAndSuffixFromInterfaceName( String intfName)
public static List<String> getPortNameAndSuffixFromInterfaceName( String intfName)
//package com.java2s; /*/* ww w. j a va 2s. c o m*/ * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ import java.util.ArrayList; import java.util.List; public class Main { public static List<String> getPortNameAndSuffixFromInterfaceName( String intfName) { List<String> strList = new ArrayList<>(2); int index = intfName.indexOf(":"); if (index != -1) { strList.add(0, intfName.substring(0, index)); strList.add(1, intfName.substring(index)); } return strList; } }