diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-02-26 14:13:42 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-02-26 14:13:42 +0000 |
commit | 5db3463334e46ec99b8da42c8745bb4448f4a7d0 (patch) | |
tree | 46fa0eedfcd3547105c5585a53b8bf6db1a84798 /comphelper/inc/comphelper/string.hxx | |
parent | 12de3a9ddef93887b69d859bdee3ec2c1994c756 (diff) |
INTEGRATION: CWS custommeta (1.2.18); FILE MERGED
2008/01/29 12:46:31 mst 1.2.18.1: - comphelper/inc/comphelper/string.hxx, comphelper/source/misc/string.cxx:
+ add two functions convertCommaSeparated
Diffstat (limited to 'comphelper/inc/comphelper/string.hxx')
-rw-r--r-- | comphelper/inc/comphelper/string.hxx | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index e1927f4e046a..d9e719a46430 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -4,9 +4,9 @@ * * $RCSfile: string.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: ihi $ $Date: 2007-11-23 13:14:37 $ + * last change: $Author: obo $ $Date: 2008-02-26 15:13:42 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -49,6 +49,11 @@ #include "sal/types.h" #endif +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + + namespace rtl { class OUString; } // rtl::OUString helper functions that are not widespread or mature enough to @@ -87,6 +92,30 @@ COMPHELPER_DLLPUBLIC rtl::OUString searchAndReplace( rtl::OUString const & to, sal_Int32 beginAt = 0, sal_Int32 * replacedAt = NULL); +/** Convert a sequence of strings to a single comma separated string. + + Note that no escaping of commas or anything fancy is done. + + @param i_rSeq A list of strings to be concatenated. + + @return A single string containing the concatenation of the given + list, interspersed with the string ", ". + */ +COMPHELPER_DLLPUBLIC ::rtl::OUString convertCommaSeparated( + ::com::sun::star::uno::Sequence< ::rtl::OUString > const & i_rSeq); + +/** Convert a single comma separated string to a sequence of strings. + + Note that no escaping of commas or anything fancy is done. + + @param i_rString A string containing comma-separated words. + + @return A sequence of strings resulting from splitting the given + string at ',' tokens and stripping whitespace. + */ +COMPHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > + convertCommaSeparated( ::rtl::OUString const & i_rString ); + } } #endif |