top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to flatten a list of Strings in Java (concatenate all strings in an array separated by comma)?

+1 vote
343 views
How to flatten a list of Strings in Java (concatenate all strings in an array separated by comma)?
posted Apr 19, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I'm trying to search for several strings, which I have in a .txt file line by line, on another file. So the idea is, take input.txt and search for each line in that file in another file, let's call it rules.txt.

So far, I've been able to do this, to search for individual strings:

import re
shakes = open("output.csv", "r")

for line in shakes:
 if re.match("STRING", line):
 print line,

How can I change this to input the strings to be searched from another file?

+1 vote

Please help to write a function that searches for the unique part of a string in an array of strings.

+4 votes

Given a dictionary of strings and another string find out if the string is an exact match to some words in the dictionary or varies at most in only one place of some word of the dictionary?

...