-package org.simantics.export.core.impl;\r
-\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class PublisherUtil {\r
-\r
- /**\r
- * Returns either filePath as is or filePath suffixed by\r
- * <code>endsWith</code> depending on whether <code>filePath</code> ends\r
- * with <code>endsWith</code> or not.\r
- * \r
- * @param suffix\r
- * @param ignoreCase\r
- * @param filePath\r
- * @return\r
- */\r
- public static String ensureEndsWith(boolean ignoreCase, String suffix, String filePath) {\r
- int suffixLen = suffix.length();\r
- int filePathLen = filePath.length();\r
- if (suffixLen > filePathLen)\r
- return filePath + suffix;\r
- if (!filePath.regionMatches(ignoreCase, filePathLen - suffixLen, suffix, 0, suffixLen))\r
- return filePath + suffix;\r
- return filePath;\r
- }\r
-\r
-}\r
+package org.simantics.export.core.impl;
+
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class PublisherUtil {
+
+ /**
+ * Returns either filePath as is or filePath suffixed by
+ * <code>endsWith</code> depending on whether <code>filePath</code> ends
+ * with <code>endsWith</code> or not.
+ *
+ * @param suffix
+ * @param ignoreCase
+ * @param filePath
+ * @return
+ */
+ public static String ensureEndsWith(boolean ignoreCase, String suffix, String filePath) {
+ int suffixLen = suffix.length();
+ int filePathLen = filePath.length();
+ if (suffixLen > filePathLen)
+ return filePath + suffix;
+ if (!filePath.regionMatches(ignoreCase, filePathLen - suffixLen, suffix, 0, suffixLen))
+ return filePath + suffix;
+ return filePath;
+ }
+
+}