From b93c04189ed3b066153b311df34faceaa84a8574 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Mon, 19 Jan 2009 00:17:33 +0100 Subject: [PATCH] improve "Capitalize First Letters" algorithm --- src/tag_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index d5f7b577..3d8d394f 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -172,7 +172,7 @@ namespace result[0] = toupper(result[0]); for (string::iterator it = result.begin()+1; it != result.end(); it++) { - if (isalpha(*it) && *(it-1) == ' ') + if (isalpha(*it) && !isalpha(*(it-1))) *it = toupper(*it); } return result;