[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
gramps
gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:49:29 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9204da9a7eecddf883c29bd9eb79780327ae3b90
Author: gramps <gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 5 16:28:14 2001 +0000
Implemented remove
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index 893c2a3..8b0fb4e 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -1009,12 +1009,18 @@ QString &QString::insert(uint, char)
return *this;
}
-QString &QString::remove(uint, uint)
+QString &QString::remove(uint index, uint width)
{
flushCache();
- // FIXME: not yet implemented
- NSLog(@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__,
- __LINE__);
+ if (s) {
+ CFIndex len = CFStringGetLength(s);
+ if (len && (index < len) && width) {
+ if (width > (len - index)) {
+ width = len - index;
+ }
+ CFStringDelete(s, CFRangeMake(index, width));
+ }
+ }
return *this;
}
diff --git a/WebCore/src/kwq/KWQString.mm b/WebCore/src/kwq/KWQString.mm
index 893c2a3..8b0fb4e 100644
--- a/WebCore/src/kwq/KWQString.mm
+++ b/WebCore/src/kwq/KWQString.mm
@@ -1009,12 +1009,18 @@ QString &QString::insert(uint, char)
return *this;
}
-QString &QString::remove(uint, uint)
+QString &QString::remove(uint index, uint width)
{
flushCache();
- // FIXME: not yet implemented
- NSLog(@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__,
- __LINE__);
+ if (s) {
+ CFIndex len = CFStringGetLength(s);
+ if (len && (index < len) && width) {
+ if (width > (len - index)) {
+ width = len - index;
+ }
+ CFStringDelete(s, CFRangeMake(index, width));
+ }
+ }
return *this;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list