Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A competition to solve a particular problem through the usage and manipulation of strings.
9
votes
Help me Open the Box
pb (NONCOMPETING), 125 bytes
^w[B!0]{>}w[B!45]{<w[B=10]{t[T+1]b[0]}}v[X]vw[T!0]{vb[124]<[X]b[124]>w[B=0]{>}t[T-1]}w[X!1]{<b[95]}<w[B!0]{^}w[Y!-1]{b[47]>^}
The version of pbi that you need to run this …
1
vote
Print invisible text
pb - 17 bytes
^w[B!0]{>}<vb[32]
Goes to the last character of the input and puts a space on the canvas cell representing it. Because output in pb is 2D, the empty cells before it are automatically fi …
6
votes
Decode Baby-talk!
brainfuck, 656 bytes
+[[>>>,[>++++[<-------->-]]<]<<[>]<-[+[<+>>+<-]----[>>+<<----]>>+[<[-<]<[>]>>-]-<[[-]>+<]>[[-[->]<<+>]<->>>]<<<[>>>+<<<-]<<-]>>>>>[[<+>>+<-]----[>-<----]>--[----<]<[>]>[----<]<[>] …
2
votes
Molding ASCII art
It is simply n hashes in a row, where n is the length of the string. Now the string is guaranteed to fit! … After all, there could be a hash in the input string! To handle this, I refer to another part of the spec:
You are given a single printable ASCII string containing no newlines
(Emphasis mine.) …
21
votes
Spoonerise words
brainfuck, 238 207 bytes
,[[<+<+>>-]++++[<-------->-]-[<<-->>-----]<<+++++[----[----[------[------>>]]]]>[>>]>,]<<++++++++[<[++++<<]<++++<[++++<<]>>[>>]>>[>>]<-]<[<<]-[<+>---]>[>.>]<[<<]<<[<<]>[>>]>[ …
2
votes
Make a Math Competition Grader
brainfuck, 354 bytes
+[--[>]<<+>-],----------[[<<<]>>->[>>>],----------]<<<[<<<]>>+[<-[-------<+>]<.+[---<+>]<.++++++++.[-<+++>]<-.+++++++++++.---.-----.-[---<+>]<-.---[-<++++>]<.+++[-<+++>]<.[---<+> …
3
votes
Make Bracket Squares
pb - 449 bytes
^w[B!0]{w[B=40]{b[39]}t[B]w[B!0]{w[B=T]{^b[1]}w[B=T+1]{^b[1]}w[B=T+2]{^b[2]}^[Y]^>}<[X]^w[B!1]{>}t[1]b[0]w[T!0]{>w[B=1]{t[T+1]b[0]}w[B=2]{t[T-1]b[0]}}b[3]vw[B!0]{>}^w[B!3]{b[0]<}b[0]vb …
2
votes
Check if a UUID is valid without using regexes
# string. … # and the string is invalid. …
1
vote
Find the center
Earlier, when I said "string", that was a total lie. pb doesn't have strings, it has characters that happen to be close to each other. … Looking for the "last character of a string" just means moving the brush to the left until it hits a character. …
1
vote
Longest Common Prefix of 2 Strings
brainfuck, 91 bytes
+[>>,>++++[<-------->-]<]<<[<<]>+[>>++++[>++++++++<-],]<[<]>>-<[>>[<+>>-<-]+>[<->,]<[<.,]>]
Requires an interpreter that either allows negative positions on the tape or wraps if …
0
votes
Longest Common Prefix of 2 Strings
pb, 105 bytes
^w[B!32]{>}>w[B!0]{t[B]vb[1]<[X]w[B!0]{>}b[T]w[B!1]{>}b[0]^>}v<[X]<t[0]w[T=0]{>t[B]^t[T-B]v}w[B!0]{b[0]>}
Takes two words separated by a single space. (I can save a byte by using a ta …
0
votes
The shortest code to invert bit-wise a binary string
pb, 46 bytes (non-competing)
^w[B!0]{w[B=48]{vb[1]^b[0]}>}vw[X!0]{<b[48+B]}
pb is newer than this challenge is, so it can't compete. Oh well.
In pb, the input lives at Y=-1. This program loops ove …
14
votes
Remove all occurrences of the first letter of a string from the entire string
. @) from the string. This is okay, because only letters and spaces will ever be present. …
2
votes
Monday Mini-Golf #3: Anagram distance
pb, 648 bytes
^w[B!0]{t[B]vb[T]^>}vb[-1]w[X!0]{<t[64]w[T!0]{w[B!0]{b[B-1]v}^[Y]t[T-1]}}w[B!-1]{w[B=0]{b[27]}t[26]w[T!0]{w[B!0]{b[B-1]v}^[Y]t[T-1]}>}b[0]w[X!0]{<w[B!0]{b[1]v}^[Y]w[B=0]{b[32]}w[B=1]{b[0 …
8
votes
Surround a string with hashes
brainfuck - 156 bytes
++++++++++>,[>>+++++[<+++++++>-],]<....[.---<<]>>+++>>+++.---.[.>>]<<.+++.[<]>.>>+++.---.<[.>>]<<<.>>.---[<]>.--->>+++.---[.>>]<<..+++.---[<]>[+++.>>]<<....
This is probably g …