Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
6a0473bc
Unverified
Commit
6a0473bc
authored
May 10, 2020
by
Rémi Verschelde
Committed by
GitHub
May 10, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #38548 from kuruk-mm/add_string_join_to_gdscript
GDScript: Add join method on String
parents
94721f5a
8c2dc177
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
variant_call.cpp
core/variant_call.cpp
+2
-0
String.xml
doc/classes/String.xml
+13
-0
No files found.
core/variant_call.cpp
View file @
6a0473bc
...
...
@@ -262,6 +262,7 @@ struct _VariantCall {
VCALL_LOCALMEM3R
(
String
,
split
);
VCALL_LOCALMEM3R
(
String
,
rsplit
);
VCALL_LOCALMEM2R
(
String
,
split_floats
);
VCALL_LOCALMEM1R
(
String
,
join
);
VCALL_LOCALMEM0R
(
String
,
to_upper
);
VCALL_LOCALMEM0R
(
String
,
to_lower
);
VCALL_LOCALMEM1R
(
String
,
left
);
...
...
@@ -1816,6 +1817,7 @@ void register_variant_methods() {
ADDFUNC3R
(
STRING
,
PACKED_STRING_ARRAY
,
String
,
split
,
STRING
,
"delimiter"
,
BOOL
,
"allow_empty"
,
INT
,
"maxsplit"
,
varray
(
true
,
0
));
ADDFUNC3R
(
STRING
,
PACKED_STRING_ARRAY
,
String
,
rsplit
,
STRING
,
"delimiter"
,
BOOL
,
"allow_empty"
,
INT
,
"maxsplit"
,
varray
(
true
,
0
));
ADDFUNC2R
(
STRING
,
PACKED_FLOAT32_ARRAY
,
String
,
split_floats
,
STRING
,
"delimiter"
,
BOOL
,
"allow_empty"
,
varray
(
true
));
ADDFUNC1R
(
STRING
,
STRING
,
String
,
join
,
PACKED_STRING_ARRAY
,
"parts"
,
varray
());
ADDFUNC0R
(
STRING
,
STRING
,
String
,
to_upper
,
varray
());
ADDFUNC0R
(
STRING
,
STRING
,
String
,
to_lower
,
varray
());
...
...
doc/classes/String.xml
View file @
6a0473bc
...
...
@@ -837,6 +837,19 @@
Returns a copy of the string with characters removed from the right.
</description>
</method>
<method
name=
"join"
>
<return
type=
"String"
>
</return>
<argument
index=
"0"
name=
"parts"
type=
"PackedStringArray"
>
</argument>
<description>
Return a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method.
Example:
[codeblock]
print(", ".join(["One", "Two", "Three", "Four"]))
[/codeblock]
</description>
</method>
<method
name=
"sha1_buffer"
>
<return
type=
"PackedByteArray"
>
</return>
...
...
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