Concurrent future...

Tuesday, March 24, 2009

string:tokens/2 does not handle empty tokens

string:tokens("A,,,,,", ",") returns ["A"] where as I expect it to return ["A", "", "", "", ""]. This can be solved using regexp:split function.

regexp:split("A,,,,,", ",") returns ["A", [], [], [], []]
Posted by Dude From Mangalore at 10:43 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: erlang, tips

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Book Promotion

About Me

Dude From Mangalore
View my complete profile

Buy this book

Subscribe Now: standard

 Subscribe in a reader

Blog Archive

  • ►  2011 (1)
    • ►  June (1)
  • ►  2010 (16)
    • ►  October (2)
    • ►  September (2)
    • ►  August (3)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  January (6)
  • ▼  2009 (25)
    • ►  October (1)
    • ►  September (3)
    • ►  August (5)
    • ►  July (1)
    • ►  June (2)
    • ►  April (2)
    • ▼  March (9)
      • RPC from Erlang Linked-in driver port
      • Sharing binary data and reference counting
      • AMPQ Client gotchas!
      • TCP server in Erlang
      • string:tokens/2 does not handle empty tokens
      • Imperative language constructs in Erlang
      • Auto increment in Mnesia database
      • Tuning TCP stack on Linux
      • Gracefully terminating erlang VM
    • ►  February (2)
  • ►  2008 (18)
    • ►  December (4)
    • ►  November (7)
    • ►  October (3)
    • ►  September (4)
Awesome Inc. theme. Powered by Blogger.