views:

230

answers:

2

When people talk about string delimiters, does that include quotes or does that mean everything except quotes?

+1  A: 

It means any character used to define the beginning and end of a string (e.g. quotes but, in other contexts, other characters).

Mark Brittingham
+1  A: 

There's a subtle difference, if you're talking about string delimiters that nearly always means quotes, either " or '.

If you're talking about a delimited string, then you're normal talking about a string of tokens, with delimiters between them ie

"this,is,a,delimited,string" -

It's very common to use a comma, as the delimiter, but that leads to issues when the token already contains a comma - for instance

"one,million,dollars,$1,000,000"

In this instance it's common to further delimit the token so we get

"one,million,dollars,"$1,000,000""

another common alternative is to use an unusual character as the delimiter, and there's a minor convention to use the pipe symbol |

"one|million|dollars|$1,000,000"

MrTelly