kohyphentest.cpp
00001
00002
00003 #include <stdio.h>
00004 #include <stdlib.h>
00005
00006 #include <qstringlist.h>
00007
00008 #include <kapplication.h>
00009
00010 #include "kohyphen.h"
00011 #include <kdebug.h>
00012
00013 int main (int argc, char ** argv)
00014 {
00015 KApplication app(argc, argv, "KoHyphenator test");
00016
00017
00018 QStringList cs_tests = QStringList() << "Žluťoučký" << "kůň" << "úpěl" <<
00019 "ďábelské" << "ódy";
00020
00021
00022 QStringList en_tests = QStringList() << "Follow" << "white" << "rabbit";
00023
00024 KoHyphenator * hypher = 0L;
00025 try {
00026 hypher = KoHyphenator::self();
00027 }
00028 catch (KoHyphenatorException &e)
00029 {
00030 kdDebug() << e.message() << endl;
00031 return 1;
00032 }
00033
00034 QStringList::ConstIterator it = cs_tests.begin();
00035
00036 while (it!=cs_tests.end()) {
00037 kdDebug() << (*it) << " hyphenates like this: " << hypher->hyphenate((*it), "cs") << endl;
00038 ++it;
00039 }
00040
00041 it = en_tests.begin();
00042
00043 while (it!=en_tests.end()) {
00044 kdDebug() << (*it) << " hyphenates like this: " << hypher->hyphenate((*it), "en") << endl;
00045 ++it;
00046 }
00047
00048 return 0;
00049 }
This file is part of the documentation for lib Library Version 1.3.5.