Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -1,12 +1,12 @@
|
|||
#include<stdio.h>
|
||||
|
||||
typedef (void *callbackfunc)(const char *);
|
||||
typedef void (*callbackfunc)(const char *);
|
||||
|
||||
void doprint(const char *s) {
|
||||
printf("%s.", s);
|
||||
}
|
||||
|
||||
void tokenize(char *s, char delim, callbackfunc *cb) {
|
||||
void tokenize(char *s, char delim, callbackfunc cb) {
|
||||
char *olds = s;
|
||||
char olddelim = delim;
|
||||
while(olddelim && *s) {
|
||||
|
|
|
|||
7
Task/Tokenize-a-string/Julia/tokenize-a-string.julia
Normal file
7
Task/Tokenize-a-string/Julia/tokenize-a-string.julia
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
s = "Hello,How,Are,You,Today"
|
||||
a = split(s, ",")
|
||||
t = join(a, ".")
|
||||
|
||||
println("The string \"", s, "\"")
|
||||
println("Splits into ", a)
|
||||
println("Reconstitutes to \"", t, "\"")
|
||||
2
Task/Tokenize-a-string/K/tokenize-a-string.k
Normal file
2
Task/Tokenize-a-string/K/tokenize-a-string.k
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
words: "," \: "Hello,How,Are,You,Today"
|
||||
"." /: words
|
||||
2
Task/Tokenize-a-string/Kotlin/tokenize-a-string.kotlin
Normal file
2
Task/Tokenize-a-string/Kotlin/tokenize-a-string.kotlin
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
val input = "Hello,How,Are,You,Today"
|
||||
println(input.splitBy(",").join("."))
|
||||
2
Task/Tokenize-a-string/Q/tokenize-a-string.q
Normal file
2
Task/Tokenize-a-string/Q/tokenize-a-string.q
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
words: "," vs "Hello,How,Are,You,Today"
|
||||
"." sv words
|
||||
2
Task/Tokenize-a-string/Self/tokenize-a-string.self
Normal file
2
Task/Tokenize-a-string/Self/tokenize-a-string.self
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
| s = 'Hello,How,Are,You,Today' |
|
||||
((s splitOn: ',') joinUsing: '.') printLine.
|
||||
|
|
@ -1 +1,2 @@
|
|||
WScript.Echo Join(Split("Hello,How,Are,You,Today", ","), ".")
|
||||
s = "Hello,How,Are,You,Today"
|
||||
WScript.StdOut.Write Join(Split(s,","),".")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue