Tags » Delimiter

Using Charindex + Cross Apply to split delimiter-separated values (SQL Server)

Let’s suppose that we have some┬ádelimiter-separated values, like this:

We want to separate the delimited values into five columns, like this:

We can solve this using the following code: 124 more words

SQL Server Transact-SQL

bash | parsing lines to array with quoted delimiters

OIFS=$IFS;IFS=$'\n';ARRAY=($(echo "$LINE" | awk '{ for (i = 0; ++i <= NF;) printf "%s\n", $i }' FPAT='([^,]+)|("[^"]+")'));IFS=$OIFS

Bytes

Java 8 StringJoiner demo

Finally Java has convenient and intuitive API for joining strings with delimiters! Since Java 8 there is StringJoiner class. It is an API that you may know from Guava Joiner classes (see my post: … 231 more words

IT