https://bugs.documentfoundation.org/show_bug.cgi?id=122352
Bug ID: 122352
Summary: Mid statement ignores length parameter
Product: LibreOffice
Version: 6.1.3.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
The Mid statement can be used to replace a sub-string inside a given string.
The third parameter specifies the number of characters to be replaced.
This parameter is ignored.
See following snippet:
Sub StringTest
Dim MyString As String
MyString = "This will be my text"
Mid(MyString, 6, 7, "is")
End Sub
In the string "This will be my text", we should see that starting at the 6th
position 7 characters are replaced by "is".
Steps to Reproduce:
Open the given snippet in the macro debugger and observe the "MyString"
variable before and after the "Mid" statement
Actual Results:
Only 2 characters instead of 7 are replaced:
"This isll be my text"
Expected Results:
7 characters should be replaced by "is":
"This is my text"
Reproducible: Always
User Profile Reset: Yes
Additional Info:
I cannot exactly tell which version was the first affected.
I have observed the described problem in LO 6.1.3.2
The problem did not yet exist in LO 6.0.5.2
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs