You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-l...@googlegroups.com
I'm writing an IRC server and I need to chomp the incoming line, strip
would also remove leading whitespace which I don't want to happen.
I'd use String.rstrip/2 but I'd need to chomp /\r?\n$/ and I'd rather
not use a full blown regex for something like this.
Any suggestions? Or want a pull for String.chomp?
Peter Minten
unread,
Sep 8, 2013, 6:49:44 AM9/8/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-l...@googlegroups.com
Wouldn't String.rstrip/1 do what you need or do you want to avoid
stripping trailing spaces?
meh.
unread,
Sep 8, 2013, 7:10:16 AM9/8/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-l...@googlegroups.com
On Sun, Sep 08, 2013 at 12:49:44PM +0200, Peter Minten wrote:
> Wouldn't String.rstrip/1 do what you need or do you want to avoid
> stripping trailing spaces?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-lang-core
We have rstrip/2. It could take a list of characters or even strings as the second argument. This would be somewhat analogous to how contains? works today.
-- Best regards Alexei Sholik
meh.
unread,
Sep 9, 2013, 6:10:21 AM9/9/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-l...@googlegroups.com
On Sun, Sep 08, 2013 at 02:15:48PM +0300, Alexei Sholik wrote:
> We have rstrip/2. It could take a list of characters or even strings as the
> second argument. This would be somewhat analogous to how contains? works
> today.