Java String Truncate truncateNumberSign(String s)

Here you can find the source of truncateNumberSign(String s)

Description

truncate Number Sign

License

Open Source License

Declaration

public static String truncateNumberSign(String s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String truncateNumberSign(String s) {
        if (s.contains("#")) {
            int i = s.indexOf("#");
            return s.substring(0, i);
        } else {//from  ww  w .  j  av a2s .com
            return s;
        }

    }
}

Related

  1. truncateMessageIn50000Characters(final String message)
  2. truncateName(String name)
  3. truncateName(String name)
  4. truncateNicely(String s, int n, String suffix)
  5. truncateNicely(String str, int lower, int upper, String appendToEnd)
  6. truncateOnlyText(String text, int position)
  7. truncateOnSpace(String text, Integer length)
  8. truncateOrPadString(String str)
  9. truncatePrefixFromPath(String fileName)