Skip to content

Commit

Permalink
add coffee_to_code in vlang (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
TonPC64 authored Oct 23, 2021
1 parent 6a59413 commit b041a64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Vlang/tonpc64.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import regex

fn coffee_to_code(s string) string {
mut re := regex.regex_opt('[Cc][Oo][Ff][Ff][Ee][Ee]') or { panic(err) }
return re.replace(s, 'code')
}

fn main() {
println(coffee_to_code('Hello Coffee'))
}

0 comments on commit b041a64

Please sign in to comment.