Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Words.h
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#ifndef _Stroika_Foundation_Linguistics_Words_h_
5#define _Stroika_Foundation_Linguistics_Words_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
10#include "Stroika/Foundation/Common/Common.h"
11
12/**
13 *
14 * \note Code-Status: <a href="Code-Status.md#Alpha">Alpha</a>
15 *
16 * TODO:
17 * @todo Very VERY primitive linguistic support, but this could easily evolve over time. Led has a bunch of
18 * lingusitic code I could move here, and I'm sure I could dig up more...
19 *
20 * @todo Perhaps these functions should take as arugment a locale() object. This is currently totally English-biased/based
21 */
22
24
25 using Characters::String;
26
27 /**
28 * e.g. 'joe smith' becomes 'Joe Smith'
29 */
30 String CapitalizeEachWord (const String& s);
31
32 /**
33 * e.g. 'joe smith' becomes 'Joe smith'
34 */
35 String CapitalizeEachSentence (const String& s);
36
37 /**
38 * e.g. 'Joe Smith' becomes 'joe Smith', but 'IBM eats' stays 'IBM eats'
39 */
40 String UnCapitalizeFirstWord (const String& s);
41
42 /**
43 */
44 bool IsAllCaps (const String& s);
45
46}
47
48/*
49 ********************************************************************************
50 ***************************** Implementation Details ***************************
51 ********************************************************************************
52 */
53
54#endif /*_Stroika_Foundation_Linguistics_Words_h_*/
String CapitalizeEachWord(const String &s)
Definition Words.cpp:29
String CapitalizeEachSentence(const String &s)
Definition Words.cpp:51
String UnCapitalizeFirstWord(const String &s)
Definition Words.cpp:78