Java tutorial
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); public class Main { public static String getLastStep(String xpStr) { int lastSlash = xpStr.lastIndexOf("/"); String result = ""; if (lastSlash != -1) { result = xpStr.substring(lastSlash + 1); } return result; } }