public class StringUtil extends Object
Constructor and Description |
---|
StringUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
append(String appendee,
String appendant,
String separator) |
static String |
commonPrefix(Collection<String> strings)
Given a set of strings, identify any prefix they have in common.
|
static String |
commonSuffix(Collection<String> strings)
Given a set of strings, identify any suffix they have in common.
|
static boolean |
containsValidCharacter(String s)
Checks a string to find "strange" character, used by phenocarta to check evidence description
|
static String[] |
csvSplit(String line) |
static String |
cvs2tsv(String line)
Made by Nicolas
|
static boolean |
isLatinLetter(char c) |
static String |
makeValidForR(String s)
Mimics the make.names method in R (character.c) to make valid variables names; we use this for column headers in
some output files.
|
static Long |
twoStringHashKey(String stringi,
String stringj) |
public static String append(String appendee, String appendant, String separator)
appendee
- The string to be added toappendant
- The string to add to the end of the appendeeseparator
- The string to put between the joined strings, if necessary.public static String commonPrefix(Collection<String> strings)
strings
- public static String commonSuffix(Collection<String> strings)
strings
- public static boolean containsValidCharacter(String s)
the
- string to checkpublic static String cvs2tsv(String line)
a
- line in a file cvs formatpublic static boolean isLatinLetter(char c)
public static String makeValidForR(String s)
s
- Copyright © 2003–2022 UBC Michael Smith Laboratories. All rights reserved.