Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

ffutil.h

Go to the documentation of this file.
00001 /*
00002  * finflect - Algorithms and tools for inflecting Finnish nouns
00003  * Copyright (C) 2004, 2005  The FinFlect Team
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *
00019  *
00020  * For the complete legal text of the GNU Lesser General Public License,
00021  * see the file LICENSE. For a complete list of authors and copyright
00022  * holders, see the file AUTHORS.
00023  */
00024 
00025 /**
00026  * @file ffutil.h Declares some necessary utility functions (implemented in ffutil.c).
00027  */
00028 
00029 #ifndef __FFUTIL_H
00030 #define __FFUTIL_H
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 #include "fftypes.h"
00037 #include "ffstring.h"
00038 
00039 /**
00040  * Determines whether the given letter is a (Finnish) vowel or not.
00041  * @param letter The letter to check
00042  * @return 1 if the letter is a vowel, 0 if it's not.
00043  */
00044 ffbool ffpriv_is_vowel(const char letter);
00045 
00046 /**
00047  * Determines whether the given letter is a (Finnish) consonant or not.
00048  * @param letter The letter to check
00049  * @return 1 if the letter is a vowel, 0 if it's not.
00050  */
00051 ffbool ffpriv_is_consonant(const char letter);
00052 
00053 /**
00054  * Returns the appropriate one, back or front, depending on whether the given string has back or front vowels.
00055  */
00056 ffchar* ffpriv_vowel_harmony(const ffstring* string, ffchar* back, ffchar* front);
00057 
00058 /**
00059  * Converts string to lower case. Supports a-z and едц.
00060  * @param source The source ffstring to be converted
00061  * @param target Initialized but empty ffstring
00062  * @return 0
00063  */
00064 ffuint32 ffutil_tolower(const ffstring* source, ffstring* target);
00065 
00066 /**
00067  * Converts string to upper case. Supports a-z and едц.
00068  * @param source The source ffstring to be converted
00069  * @param target Initialized but empty ffstring
00070  * @return 0
00071  */
00072 ffuint32 ffutil_toupper(const ffstring* source, ffstring* target);
00073 
00074 /**
00075  * Converts ffchar to lower case. Supports a-z and едц
00076  * @param c The ffchar to be converted
00077  * @return Lower case character if possible
00078  */
00079 ffchar ffutil_ffchar_tolower(ffchar c);
00080 
00081 #ifdef __cplusplus
00082 }
00083 #endif
00084 
00085 #endif

Generated on Thu Jun 2 23:16:59 2005 for FinFlect by  doxygen 1.4.2