[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: Bug#14268: kjs: String method split malfunction
From: Hatto von Hatzfeld <hatto () salesianer ! de>
Date: 2000-10-31 21:56:35
[Download RAW message or body]
Package: kjs
Version: konqueror 1.9.8 (KDE 2)
Severity: normal
System: SuSE 6.2, kernel 2.2.13
malfunction of String method split(x) if x is a string and x.length > 1
Example:
"xabcyabczabcx".split("abc").join("*")
results in
"x*bcy*bcz*bcx"
instead of "x*y*z*x"
Suggestion: In string_object.cpp (line 257: p0 = pos + 1) under "case
Split:" one should not add just 1 but the length of the search string.
(Sorry, I know Javascript, but not C++).
A demo of this bug can be found on:
http://www.hattos-seiten.de/konquerorjsbugs.html
Bye,
Hatto
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic