diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-10-09 19:44:27 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-10-09 19:44:27 -0300 |
commit | 01ffe6cf89ee0ca32222f6993a2f8e3c872ce0b5 (patch) | |
tree | 8aaf86cdf21021fdf90e37fc3e1607197f2a8c1c /core | |
parent | 9142d6fc408d72178f102bad97c0c2fe1902ce55 (diff) |
-Rasterizer supports meshes with both skeletons and blend shapes
-Collada exporter supports Blend Shapes (even on actions via set driven keys)
Diffstat (limited to 'core')
-rw-r--r-- | core/ustring.cpp | 36 | ||||
-rw-r--r-- | core/ustring.h | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index cd33c276a8..d75c21d16e 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -555,6 +555,42 @@ String String::get_slice(String p_splitter, int p_slice) const { } + +Vector<String> String::split_spaces() const { + + Vector<String> ret; + int from=0; + int i=0; + int len = length(); + bool inside=false; + + while(true) { + + bool empty=operator[](i)<33; + + if (i==0) + inside=!empty; + + if (!empty && !inside) { + inside=true; + from=i; + } + + if (empty && inside) { + + ret.push_back(substr(from,i-from)); + inside=false; + } + + if (i==len) + break; + i++; + } + + return ret; + +} + Vector<String> String::split(const String &p_splitter,bool p_allow_empty) const { Vector<String> ret; diff --git a/core/ustring.h b/core/ustring.h index 4831341866..8fe3a95463 100644 --- a/core/ustring.h +++ b/core/ustring.h @@ -150,6 +150,7 @@ public: String get_slice(String p_splitter,int p_slice) const; Vector<String> split(const String &p_splitter,bool p_allow_empty=true) const; + Vector<String> split_spaces() const; Vector<float> split_floats(const String &p_splitter,bool p_allow_empty=true) const; Vector<float> split_floats_mk(const Vector<String> &p_splitters,bool p_allow_empty=true) const; Vector<int> split_ints(const String &p_splitter,bool p_allow_empty=true) const; |