Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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
Results tagged with Search options user 49439

A competition to solve a particular problem through the usage and manipulation of strings.

1
vote
R, 52 bytes cat(union(a<-strsplit(readline(),"")[[1]],a),sep="") Test examples: Type uniqchars! "I think'sdarloe,yu 3.14592687
answered Sep 28 '16 by Andreï Kostyrka
2
votes
R, 45 bytes sum(as.numeric(charToRaw(scan(,"")))-96)==100 Try it online! Returns TRUE or FALSE. As stated in the question, expects user input in a-z, converts the characters to numbers, brings …
answered Mar 30 '18 by Andreï Kostyrka
11
votes
2answers
must be analysed as one string, as one long sentence, as one long vector of words (whichever is more convenient for your language), stripped of linebreaks, and split into words at spaces. (I do not … supply a single-paragraph file because such might be frowned upon by github tools.) How do I read the whole text as one string / sentence? An example in R: p_raw <- read.table("proust.txt", sep="\t …
asked Sep 7 '16 by Andreï Kostyrka
1
vote
<- as.character(p_raw$V1) # Conversion to character vector p_str <- paste(p_vec, collapse=" ") # One long string with spaces p_spl <- strsplit(p_str, split=" ")[[1]] # Vector of 1360883 words … (proust) Final preparation: we split the input string at zeros using a function that we call prep): prep <- function (x) { x <- chartr("0", " ", x) x <- strsplit(x, " ")[[1]] x <- x[x!=""] # Boil …
answered Sep 10 '16 by Andreï Kostyrka
7
votes
R, 90 75 bytes a=scan(,'');l=letters;L=LETTERS;cat("if"(a%in%l,l,"if"(a%in%L,L,a)),sep="") Thanks to Giuseppe. Old version (90 bytes): a=scan(,'');l=letters;L=LETTERS;if(a%in%l)cat(l,sep="")else …
answered Jul 22 '16 by Andreï Kostyrka
11
votes
R, 99 98 89 bytes x=el(strsplit(readline(),"")) z=grepl("[aeiou]",x) x[z]=x[sample(which(z))] cat(x,sep="") Seems to be the first human-readable solution! Thanks to Giuseppe for saving 9 bytes! Te …
answered Aug 31 '16 by Andreï Kostyrka
3
votes
R, 64 61 55 bytes, 73 67 bytes (robust) or 46 bytes (if empty strings are allowed) Again, xnor's answer reworked. If it is implied by the rules that the input will consist of a string of as and bs …
answered Jul 22 '16 by Andreï Kostyrka