X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.export.core%2Fsrc%2Forg%2Fsimantics%2Fexport%2Fcore%2Fimpl%2FPublisherUtil.java;h=668b646072a400dcab1dcd59d0f75c4f2c40252d;hb=refs%2Fchanges%2F38%2F238%2F2;hp=b2ae02aff42a207fe84a98c676329cf6eea0d595;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.export.core/src/org/simantics/export/core/impl/PublisherUtil.java b/bundles/org.simantics.export.core/src/org/simantics/export/core/impl/PublisherUtil.java index b2ae02aff..668b64607 100644 --- a/bundles/org.simantics.export.core/src/org/simantics/export/core/impl/PublisherUtil.java +++ b/bundles/org.simantics.export.core/src/org/simantics/export/core/impl/PublisherUtil.java @@ -1,29 +1,29 @@ -package org.simantics.export.core.impl; - - -/** - * @author Tuukka Lehtonen - */ -public class PublisherUtil { - - /** - * Returns either filePath as is or filePath suffixed by - * endsWith depending on whether filePath ends - * with endsWith 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; - } - -} +package org.simantics.export.core.impl; + + +/** + * @author Tuukka Lehtonen + */ +public class PublisherUtil { + + /** + * Returns either filePath as is or filePath suffixed by + * endsWith depending on whether filePath ends + * with endsWith 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; + } + +}