|
@@ -190,7 +190,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
|
|
|
|
int pos = 0;
|
|
int pos = 0;
|
|
while (pos < bbcode.length()) {
|
|
while (pos < bbcode.length()) {
|
|
- int brk_pos = bbcode.find("[", pos);
|
|
|
|
|
|
+ int brk_pos = bbcode.find_char('[', pos);
|
|
|
|
|
|
if (brk_pos < 0) {
|
|
if (brk_pos < 0) {
|
|
brk_pos = bbcode.length();
|
|
brk_pos = bbcode.length();
|
|
@@ -210,7 +210,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- int brk_end = bbcode.find("]", brk_pos + 1);
|
|
|
|
|
|
+ int brk_end = bbcode.find_char(']', brk_pos + 1);
|
|
|
|
|
|
if (brk_end == -1) {
|
|
if (brk_end == -1) {
|
|
String text = bbcode.substr(brk_pos, bbcode.length() - brk_pos);
|
|
String text = bbcode.substr(brk_pos, bbcode.length() - brk_pos);
|
|
@@ -239,7 +239,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
output.append("[");
|
|
output.append("[");
|
|
pos = brk_pos + 1;
|
|
pos = brk_pos + 1;
|
|
} else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
|
|
} else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
|
|
- const int tag_end = tag.find(" ");
|
|
|
|
|
|
+ const int tag_end = tag.find_char(' ');
|
|
const String link_tag = tag.substr(0, tag_end);
|
|
const String link_tag = tag.substr(0, tag_end);
|
|
const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
|
|
const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
|
|
|
|
|
|
@@ -385,7 +385,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
pos = brk_end + 1;
|
|
pos = brk_end + 1;
|
|
tag_stack.push_front(tag);
|
|
tag_stack.push_front(tag);
|
|
} else if (tag == "url") {
|
|
} else if (tag == "url") {
|
|
- int end = bbcode.find("[", brk_end);
|
|
|
|
|
|
+ int end = bbcode.find_char('[', brk_end);
|
|
if (end == -1) {
|
|
if (end == -1) {
|
|
end = bbcode.length();
|
|
end = bbcode.length();
|
|
}
|
|
}
|
|
@@ -403,7 +403,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
pos = brk_end + 1;
|
|
pos = brk_end + 1;
|
|
tag_stack.push_front("url");
|
|
tag_stack.push_front("url");
|
|
} else if (tag == "img") {
|
|
} else if (tag == "img") {
|
|
- int end = bbcode.find("[", brk_end);
|
|
|
|
|
|
+ int end = bbcode.find_char('[', brk_end);
|
|
if (end == -1) {
|
|
if (end == -1) {
|
|
end = bbcode.length();
|
|
end = bbcode.length();
|
|
}
|
|
}
|
|
@@ -455,7 +455,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
|
|
|
|
int pos = 0;
|
|
int pos = 0;
|
|
while (pos < bbcode.length()) {
|
|
while (pos < bbcode.length()) {
|
|
- int brk_pos = bbcode.find("[", pos);
|
|
|
|
|
|
+ int brk_pos = bbcode.find_char('[', pos);
|
|
|
|
|
|
if (brk_pos < 0) {
|
|
if (brk_pos < 0) {
|
|
brk_pos = bbcode.length();
|
|
brk_pos = bbcode.length();
|
|
@@ -488,7 +488,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- int brk_end = bbcode.find("]", brk_pos + 1);
|
|
|
|
|
|
+ int brk_end = bbcode.find_char(']', brk_pos + 1);
|
|
|
|
|
|
if (brk_end == -1) {
|
|
if (brk_end == -1) {
|
|
if (!line_del) {
|
|
if (!line_del) {
|
|
@@ -551,7 +551,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
xml_output.append("[");
|
|
xml_output.append("[");
|
|
pos = brk_pos + 1;
|
|
pos = brk_pos + 1;
|
|
} else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
|
|
} else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
|
|
- const int tag_end = tag.find(" ");
|
|
|
|
|
|
+ const int tag_end = tag.find_char(' ');
|
|
const String link_tag = tag.substr(0, tag_end);
|
|
const String link_tag = tag.substr(0, tag_end);
|
|
const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
|
|
const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
|
|
|
|
|
|
@@ -696,7 +696,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
pos = brk_end + 1;
|
|
pos = brk_end + 1;
|
|
tag_stack.push_front(tag);
|
|
tag_stack.push_front(tag);
|
|
} else if (tag == "code" || tag.begins_with("code ")) {
|
|
} else if (tag == "code" || tag.begins_with("code ")) {
|
|
- int end = bbcode.find("[", brk_end);
|
|
|
|
|
|
+ int end = bbcode.find_char('[', brk_end);
|
|
if (end == -1) {
|
|
if (end == -1) {
|
|
end = bbcode.length();
|
|
end = bbcode.length();
|
|
}
|
|
}
|
|
@@ -751,7 +751,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
pos = brk_end + 1;
|
|
pos = brk_end + 1;
|
|
tag_stack.push_front(tag);
|
|
tag_stack.push_front(tag);
|
|
} else if (tag == "url") {
|
|
} else if (tag == "url") {
|
|
- int end = bbcode.find("[", brk_end);
|
|
|
|
|
|
+ int end = bbcode.find_char('[', brk_end);
|
|
if (end == -1) {
|
|
if (end == -1) {
|
|
end = bbcode.length();
|
|
end = bbcode.length();
|
|
}
|
|
}
|
|
@@ -772,7 +772,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
pos = brk_end + 1;
|
|
pos = brk_end + 1;
|
|
tag_stack.push_front("url");
|
|
tag_stack.push_front("url");
|
|
} else if (tag == "img") {
|
|
} else if (tag == "img") {
|
|
- int end = bbcode.find("[", brk_end);
|
|
|
|
|
|
+ int end = bbcode.find_char('[', brk_end);
|
|
if (end == -1) {
|
|
if (end == -1) {
|
|
end = bbcode.length();
|
|
end = bbcode.length();
|
|
}
|
|
}
|
|
@@ -1619,7 +1619,7 @@ void BindingsGenerator::_generate_global_constants(StringBuilder &p_output) {
|
|
|
|
|
|
bool enum_in_static_class = false;
|
|
bool enum_in_static_class = false;
|
|
|
|
|
|
- if (enum_proxy_name.find(".") > 0) {
|
|
|
|
|
|
+ if (enum_proxy_name.find_char('.') > 0) {
|
|
enum_in_static_class = true;
|
|
enum_in_static_class = true;
|
|
String enum_class_name = enum_proxy_name.get_slicec('.', 0);
|
|
String enum_class_name = enum_proxy_name.get_slicec('.', 0);
|
|
enum_proxy_name = enum_proxy_name.get_slicec('.', 1);
|
|
enum_proxy_name = enum_proxy_name.get_slicec('.', 1);
|