commas (428)


language agnostic - Split a string ignoring quoted sections

language agnostic - Split a string ignoring quoted sections

Given a string like this: a,"string, with",various,"values, and some",quoted What is a good algorithm to split this based on commas while ignoring the commas inside the quoted sections? The output…


Remove Quotes and Commas from a String in MySQL

I'm importing some data from a CSV file, and numbers that are larger than 1000 get turned into 1,100 etc. What's a good way to remove both the quotes and the comma from this so I can put it into an…


Format numbers to strings in Python

I need to find out how to format numbers as strings. My code is here: return str(hours)+":"+str(minutes)+":"+str(seconds)+" "+ampm Hours and minutes are integers, and seconds is a float. the str() fun…


Program for working with large CSV Files

Are there any good programs for dealing with reading large CSV files? Some of the datafiles I deal with are in the 1 GB range. They have too many lines for Excel to even deal with. Using Access can…



python - How would you make a comma-separated string from a list of strings?

What would be your preferred way to concatenate strings from a sequence such that between each two consecutive pair a comma is added. That is, how do you map, for instance,['a', 'b', 'c']to 'a,b,c…


How do I format a number in Java?

How do I format a number in Java? What are the "Best Practices"? Will I need to round a number before I format it? 32.302342342342343=> 32.30.7323=> 0.73 etc.…


JavaScript culture sensitive currency formatting

How can i format currency related data in a manner that is culture aware in JavaScript?…


c# - .NET String.Format() to add commas in thousands place for a number

I want to add a comma in the thousands place for a number. String.Format()?…


MySQL search and replace some text in a field

What MySQL query will do a text search and replace in one particular field in a table? I.e. search for foo and replace with bar so a record with a field with the value hello foo becomes hello bar.…


How can I format numbers as dollars currency string in JavaScript?

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00" What's the best way to do this?…




with format number string comma decimal and javascript currency convert