strings (3,359)


Regex: To pull out a sub-string between two tags in a string

Regex: To pull out a sub-string between two tags in a string

I have a file in the following format: Data Data Data[Start] Data I want[End] Data I'd like to grab the Data I want from between the[Start] and[End] tags using a Regex. Can anyone show me how th…


What are the different methods to parse strings in Java?

For parsing player commands, I've most often used the split method to split a string by delimiters and then to then just figure out the rest by a series of ifs or switches. What are some different way…


What is the difference between String and string in C#?

Example(note the case): string s="Hello world!"; String s="Hello world!"; What are the guidelines for the use of each? And what are the differences ?…


Generate insert SQL statements from a CSV file

I need to import a csv file into Firebird and I've spent a couple of hours trying out some tools and none fit my needs. The main problem is that all the tools I've been trying like EMS Data Import and…


search - grep a file, but show several surrounding lines?

I would like to grep for a string, but also show the preceding five lines and the following five lines as well as the matched line. How would I be able to do this?…


internationalization - Any good resources or advice for working with languages with different orientations?(such as Japanese or Chinese)

We have an enterprise web application where every bit of text in the system is localised to the user's browser's culture setting. So far we have only supported English, American(similar but mis-spel…


String output: format or concat in C#?

Let's say that you want to output or concat strings. Which of the following styles do you prefer? var p=new{FirstName="Bill", LastName="Gates"}; Console.WriteLine("{0}{1}", p.FirstName, p.LastName); C…



performance - Choosing a multiplier for a(string) hash function

Do you have any advice/rules on selecting a multiplier to use in a(multiplicative) hash function. The function is computing the hash value of a string.…


java - Converting List<Integer> to List<String>

I have a list of integers, List<Integer> and I'd like to convert all the integer objects into Strings, thus finishing up with a new List<String>.Naturally, I could create a new List<String> and loop t…


c# - Most efficient way to concatenate strings?

What's the most efficient way to concatenate strings?…




string how array list two java python with compare and