Skip to main content
added 242 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

Japt, 7 bytes

r+iT Èl

Try it here

r+iT Èl     :Implicit input of string
r           :Replace
 +i         :  "+" prepended with
   T        :    0, giving the RegEx /0+/g
     È      :  Pass each match through a function
      l     :    Length

Japt, 7 bytes

r+iT Èl

Try it here

Japt, 7 bytes

r+iT Èl

Try it here

r+iT Èl     :Implicit input of string
r           :Replace
 +i         :  "+" prepended with
   T        :    0, giving the RegEx /0+/g
     È      :  Pass each match through a function
      l     :    Length
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

Japt, 7 bytes

r+iT Èl

Try it here