Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
13
Task/String-prepend/Elena/string-prepend.elena
Normal file
13
Task/String-prepend/Elena/string-prepend.elena
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#import system.
|
||||
|
||||
#symbol program =
|
||||
[
|
||||
#var s := "World".
|
||||
s := "Hello " + s.
|
||||
console writeLine:s.
|
||||
|
||||
// Alternative way
|
||||
#var s2 := String new:"World".
|
||||
s2 insert:"Hello " &at:0.
|
||||
console writeLine:s2.
|
||||
].
|
||||
2
Task/String-prepend/Elixir/string-prepend.elixir
Normal file
2
Task/String-prepend/Elixir/string-prepend.elixir
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
str1 = "World!"
|
||||
str = "Hello, " <> str1
|
||||
2
Task/String-prepend/Emacs-Lisp/string-prepend-1.l
Normal file
2
Task/String-prepend/Emacs-Lisp/string-prepend-1.l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(defun glue (str1 str2)
|
||||
(concat str1 str2) )
|
||||
2
Task/String-prepend/Emacs-Lisp/string-prepend-2.l
Normal file
2
Task/String-prepend/Emacs-Lisp/string-prepend-2.l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(defun glue (str1 str2)
|
||||
(format "%s%s" str1 str2) )
|
||||
3
Task/String-prepend/Emacs-Lisp/string-prepend-3.l
Normal file
3
Task/String-prepend/Emacs-Lisp/string-prepend-3.l
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(setq str "World!")
|
||||
(setq str (glue "Hello, " str) )
|
||||
(insert str)
|
||||
3
Task/String-prepend/PowerShell/string-prepend.psh
Normal file
3
Task/String-prepend/PowerShell/string-prepend.psh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$str = "World!"
|
||||
$str = "Hello, " + $str
|
||||
$str
|
||||
|
|
@ -1,17 +1,14 @@
|
|||
/*──────────────── using literal abuttal. */
|
||||
/*──────────────── this won't work as the first */
|
||||
/*──────────────── variable name is X or B */
|
||||
zz='llo world!'
|
||||
zz='he'zz
|
||||
zz= 'llo world!' /*─────────────── using literal abuttal.────────────*/
|
||||
zz= 'he'zz /*This won't work if the variable name is X or B */
|
||||
say zz
|
||||
|
||||
/*──────────────── using literal concatenation. */
|
||||
gg = "llo world!"
|
||||
|
||||
gg = "llo world!" /*─────────────── using literal concatenation.──────*/
|
||||
gg = 'he' || gg
|
||||
say gg
|
||||
|
||||
/*──────────────── using variable concatenation.*/
|
||||
aString = 'llo world!'
|
||||
bString = "he"
|
||||
aString = bString || aString
|
||||
|
||||
aString= 'llo world!' /*─────────────── using variable concatenation.─────*/
|
||||
bString= "he"
|
||||
aString= bString || aString
|
||||
say aString
|
||||
|
|
|
|||
3
Task/String-prepend/VBScript/string-prepend.vb
Normal file
3
Task/String-prepend/VBScript/string-prepend.vb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
s = "bar"
|
||||
s = "foo" & s
|
||||
WScript.Echo s
|
||||
Loading…
Add table
Add a link
Reference in a new issue