Synopsis: |
| todospath.java |
| ||
package jsnippets;
import utjava.ut;
public class todospath
{
public String toDosPath(String path)
{
return path.replace('/', '\\');
}
public void test_identities()
{
ut.utassert(toDosPath(""), "");
ut.utassert(toDosPath("x"), "x");
ut.utassert(toDosPath("c:\\x"), "c:\\x");
}
public void test_1()
{
ut.utassert(toDosPath("x/y"), "x\\y");
ut.utassert(toDosPath("/y"), "\\y");
ut.utassert(toDosPath("x/"), "x\\");
ut.utassert(toDosPath("c:x/"), "c:x\\");
ut.utassert(toDosPath("/"), "\\");
}
}
|
| Contact me about content on this page using john_web-at-arrizza-dot-com |
| For Web Master or site problems contact: webadmin-at-arrizza-dot-com |
| Copyright John Arrizza (c) 2001,2002,2003,2004,2005,2006,2007 |