1 |
|
|
/*************************************** |
2 |
|
|
Auteur : Pierre Aubert |
3 |
|
|
Mail : aubertp7@gmail.com |
4 |
|
|
Licence : CeCILL-C |
5 |
|
|
****************************************/ |
6 |
|
|
|
7 |
|
|
#include "accord_shadok.h" |
8 |
|
|
|
9 |
|
|
///Accord a word by respect of its quantity |
10 |
|
|
/** @param name : name to be accored (or chord) |
11 |
|
|
* @param nbName : number of name |
12 |
|
|
* @retrun accorded string (with a 's' if necessary) |
13 |
|
|
*/ |
14 |
|
2 |
std::string accord_shadok(const std::string & name, size_t nbName){ |
15 |
|
|
|
16 |
✓✓ |
2 |
if(nbName <= 1lu){ |
17 |
|
1 |
return name; |
18 |
|
|
}else{ |
19 |
|
1 |
return name + "s"; |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
} |
23 |
|
|
|