New answers tagged string
0
votes
Remove odd indices and double the even indices
Tcl, 56 bytes
proc D s {join [lmap a\ b [split $s ""] {join $b$b}] ""}
Attempt This Online!
0
votes
0
votes
All Your Base Are Belong To Us (Restricted)
Haskell, 59 - 40 = 19
p$p$p$"Doo#|rx"++p"v$fewi$ev"++"h#ehorqj#wr#xv";p=(pred<$>)
Try it online!
Shifts chars by 3 (and some ...
0
votes
1
vote
Output the HTML colors
Ruby, 75 bytes
Builds a list of possible colors using a Cartesian product and filters down to the correct ones with regex.
...
0
votes
Output the HTML colors
Tcl, 123 bytes
lmap c {0 80 FF 8000 8080 FF00 FFFF 800000 800080 808000 808080 C0C0C0 FF0000 FF00FF FFFF00 FFFFFF} {puts [format %06s $c]}
Attempt This Online!
0
votes
1
vote
0
votes
Number of string permutations that are palindromes
Vyxal 3, 5 bytes
⑴/⇄⧖∑
Vyxal It Online!
...
0
votes
2
votes
Find the largest contiguous prime in a string
Nekomata, 4 bytes
qĜQÅ
Attempt This Online!
Explanation
...
0
votes
1, 2, Fizz, 4, Buzz
Groovy, 60 bytes
1.upto(100){i->println"${i%3?'':'Fizz'}${i%5?'':'Buzz'}"?:i}
0
votes
Find the largest contiguous prime in a string
APL(NARS), 64 chars
{×≢⍵:⍕↑m/⍨m=⌈/m←⍎¨k←⍵⋄''}∘{∼×≢⍵:''⋄0π⍎⍵:,⊂⍵⋄×≢r←∇1↓⍵:r,∇¯1↓⍵⋄''}
Input one string contain only digits output one string. If not find one ...
0
votes
Find the largest contiguous prime in a string
Pascal, 326 B
This complete program requires a processor supporting features of Extended Pascal as defined by ISO standard 10206.
...
0
votes
0
votes
0
votes
2
votes
0
votes
True color code
Fortran (GFortran), 35 bytes
print'("#"Z6.6)',(i,i=0,8**8-1)
end
Try it online!
2
votes
1
vote
Trick or Treat polyglot
Brainfuck/JavaScript, 60 bytes
console["log"]("treat")//-[---[>]>+<<+<--]>+.--.>>++.>-.<++.
0
votes
0
votes
This isn't rocket science
AWK, 59 bytes
{gsub(/./," |&|\n")}$0=" |\n /_\\\n"$0" |_|\n/___\\\n VvV"
Attempt This Online!
Different AWK approach.
1
vote
Internationalisation -> I18n (numeronym)
K (ngn/k), 16 bytes
{($#2_x)/*x,'|x}
Try it online!
Function { } that zips ,' the argument <...
Top 50 recent answers are included
Related Tags
string × 2283code-golf × 2161
ascii-art × 217
decision-problem × 150
kolmogorov-complexity × 126
parsing × 125
number × 105
code-challenge × 72
natural-language × 68
math × 63
random × 61
balanced-string × 58
array × 56
restricted-source × 48
grid × 46
subsequence × 42
sorting × 40
alphabet × 39
sequence × 38
arithmetic × 38
permutations × 37
source-layout × 35
date × 34
counting × 33
palindrome × 33