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.
0
votes
Map key with value as standard
I mean, they are associated, you can find the value for a key:
val map = "(01)99012345670019(10)Ab1234(3102)00122515190521(337n)001234".function()
fun getValue(key: String) = map.find { it[0] == key } …
2
votes
Are the brackets fully matched?
Kotlin, 100 89 86 bytes
-11 bytes: Use any instead of firstOrNull
-3 bytes: Use chunked instead of split (thanks to @leo848)
fun f(s:String):Boolean="()<>[]{}".chunked(2).any{it in s&&f(s.replace(it," …
0
votes
Convert a string of digits from words to an integer
Kotlin, 64 bytes
{split(" ").fold(0){a,b->10*a+"rothuvsein".indexOf((b+b+b)[6])}}
Improving upon this answer.
Try it online!