string title bif?

Wes James <>
Fri Jun 25 20:23:02 CEST 2010

Is there a BIF that does this (I can't find one, if there is):

string:title("this_is_a_title") -> "This Is A Title".

Or something like this?  If not I'll just create one.

It would need to split the string at the "_" and then uppercase the
first character of each word.

This test works:




start() ->
title([H|T]) ->
title([]) -> [].

fc_upper([C|R]) ->




More information about the erlang-questions mailing list