Announcement

Collapse
No announcement yet.

String.Split(",")

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • String.Split(",")

    I am having a problem with the following line of code:

    Code:
                var splitTest = line.Split(",");
    The variable "line" is not null and has a string about 40 characters long but the , is NOT in that string.

    I find that the function "bombs out" - i.e. does not continue - when that line is hit.

    I know that Split() is a javascript string function but I would have thought it would have survived a call where the token was not in the string?

    Any idea how to work with this use case?
    Standing on the shoulders of giants.

  • #2
    wildfiction
    The syntax should be line.split(",") instead of line.Split(",")
    Alex

    Comment


    • #3
      Thanks Alexis.

      Stupid mistake on my part.
      Standing on the shoulders of giants.

      Comment


      • #4
        wildfiction
        My pleasure
        Alex

        Comment

        Working...
        X