You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/12/03 04:38:50 UTC
svn commit: r481697 -
/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
Author: jsdelfino
Date: Sat Dec 2 19:38:47 2006
New Revision: 481697
URL: http://svn.apache.org/viewvc?view=rev&rev=481697
Log:
Make Utils::tokeniseString work with a separator string longer than 1 char, the code was assuming that this string only contained one char.
Modified:
incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp?view=diff&rev=481697&r1=481696&r2=481697
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp Sat Dec 2 19:38:47 2006
@@ -55,10 +55,11 @@
string::size_type sep = str.find(separator);
if (sep != string::npos)
{
+ int l = separator.length();
token1 = str.substr(0, sep);
- if ( (sep+1) < str.length())
+ if ( (sep+l) < str.length())
{
- token2 = str.substr(sep+1);
+ token2 = str.substr(sep+l);
}
else
{
@@ -81,10 +82,11 @@
string::size_type sep = str.rfind(separator);
if (sep != string::npos)
{
+ int l = separator.length();
token1 = str.substr(0, sep);
- if ( (sep+1) < str.length())
+ if ( (sep+l) < str.length())
{
- token2 = str.substr(sep+1);
+ token2 = str.substr(sep+l);
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org