From c19ae5c6d45085528dae8c94a2eb737e06c335ce Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sun, 22 May 2011 13:04:11 -0400
Subject: [PATCH] Documentation.

---
 src/com/gitblit/utils/StringUtils.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java
index 6d646df..8b7960b 100644
--- a/src/com/gitblit/utils/StringUtils.java
+++ b/src/com/gitblit/utils/StringUtils.java
@@ -5,8 +5,9 @@
 import java.security.NoSuchAlgorithmException;
 import java.util.List;
 
+
 public class StringUtils {
-	
+
 	public static boolean isEmpty(String value) {
 		return value == null || value.trim().length() == 0;
 	}
@@ -106,5 +107,11 @@
 			throw new RuntimeException(t);
 		}
 	}
-
+	
+	public static String getRootPath(String path) {
+		if (path.indexOf('/') > -1) {
+			return path.substring(0, path.indexOf('/'));
+		}
+		return "";
+	}
 }

--
Gitblit v1.9.1