Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
46fbe490
Commit
46fbe490
authored
Sep 28, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added StrReverse implementation.
parent
9554e44e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
global.c
dlls/vbscript/global.c
+19
-2
api.vbs
dlls/vbscript/tests/api.vbs
+9
-0
No files found.
dlls/vbscript/global.c
View file @
46fbe490
...
...
@@ -1187,8 +1187,25 @@ static HRESULT Global_Replace(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, V
static
HRESULT
Global_StrReverse
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
WCHAR
*
ptr1
,
*
ptr2
,
ch
;
BSTR
ret
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_variant
(
arg
));
hres
=
to_string
(
arg
,
&
ret
);
if
(
FAILED
(
hres
))
return
hres
;
ptr1
=
ret
;
ptr2
=
ret
+
SysStringLen
(
ret
)
-
1
;
while
(
ptr1
<
ptr2
)
{
ch
=
*
ptr1
;
*
ptr1
++
=
*
ptr2
;
*
ptr2
--
=
ch
;
}
return
return_bstr
(
res
,
ret
);
}
static
HRESULT
Global_InStrRev
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
46fbe490
...
...
@@ -196,6 +196,15 @@ Call ok(Space(5.2) = " ", "Space(5.2) = " & Space(5.2) & """")
Call
ok
(
Space
(
5.8
)
=
" "
,
"Space(5.8) = "
&
Space
(
5.8
)
&
"
""
"
)
Call
ok
(
Space
(
5.5
)
=
" "
,
"Space(5.5) = "
&
Space
(
5.5
)
&
"
""
"
)
Sub
TestStrReverse
(
str
,
ex
)
Call
ok
(
StrReverse
(
str
)
=
ex
,
"StrReverse("
&
str
&
") = "
&
StrReverse
(
str
))
End
Sub
TestStrReverse
"test"
,
"tset"
TestStrReverse
""
,
""
TestStrReverse
123
,
"321"
if
isEnglishLang
then
TestStrReverse
true
,
"eurT"
Sub
TestRound
(
val
,
exval
,
vt
)
Call
ok
(
Round
(
val
)
=
exval
,
"Round("
&
val
&
") = "
&
Round
(
val
))
Call
ok
(
getVT
(
Round
(
val
))
=
vt
,
"getVT(Round("
&
val
&
")) = "
&
getVT
(
Round
(
val
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment