Skip to main content
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
Results tagged with
Search options not deleted user 2325

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

12 votes

Convert C header names to C++ header names

Java 8 — 25 characters h->"c"+h.replace(".h","")
fredoverflow's user avatar
  • 2,709
10 votes

Convert C header names to C++ header names

Haskell — 23 characters ('c':).takeWhile(/='.') Haskell — 16 characters, as suggested by nimi ('c':).init.init
fredoverflow's user avatar
  • 2,709
27 votes
55 answers
4k views

Convert C header names to C++ header names

You can do the conversion in-place, or leave the original string intact and return a new string. Whatever feelds natural in your language of choice. …
fredoverflow's user avatar
  • 2,709