@@ -853,13 +853,22 @@ impl String {
853853 pub fn internal_append_from_memory(&mut self, ptr: i32, len: i32);
854854 pub fn internal_reserve_uninit(&mut self, n: i32) -> i32;
855855 pub fn append_byte_filled(&mut self, byte: u8, n: i32);
856+ pub fn push_str(&mut self, other: String);
856857 pub fn append(&mut self, other: String);
857858 pub fn concat(a: String, b: String) -> String;
858859 pub fn bytes(&self) -> StrUtf8ByteIter;
859860 pub fn chars(&self) -> StrCharIter;
861+ pub fn push(&mut self, c: char);
860862 pub fn append_char(&mut self, c: char);
861- pub fn truncate_bytes (&mut self, byte_len: i32);
863+ pub fn truncate (&mut self, byte_len: i32);
862864 pub fn truncate_chars(&mut self, char_count: i32);
865+ pub fn truncate_bytes(&mut self, byte_len: i32);
866+ pub fn pop(&mut self) -> Option<char>;
867+ pub fn clear(&mut self);
868+ pub fn capacity(&self) -> i32;
869+ pub fn reserve(&mut self, additional: i32);
870+ pub fn shrink_to_fit(&mut self);
871+ pub fn as_bytes(&self) -> Array<u8>;
863872 pub fn trim_ascii_start(&self) -> String;
864873 pub fn trim_ascii_end(&self) -> String;
865874 pub fn trim_ascii(&self) -> String;
@@ -868,10 +877,28 @@ impl String {
868877 pub fn trim(&self) -> String;
869878 pub fn to_ascii_lowercase(&self) -> String;
870879 pub fn to_ascii_uppercase(&self) -> String;
880+ pub fn contains(&self, pat: String) -> bool;
881+ pub fn starts_with(&self, pat: String) -> bool;
882+ pub fn ends_with(&self, pat: String) -> bool;
883+ pub fn find(&self, pat: String) -> Option<i32>;
884+ pub fn rfind(&self, pat: String) -> Option<i32>;
885+ pub fn contains_char(&self, ch: char) -> bool;
886+ pub fn find_char(&self, pred: Fn(char) -> bool) -> Option<i32>;
887+ pub fn insert(&mut self, byte_index: i32, ch: char);
888+ pub fn insert_str(&mut self, byte_index: i32, s: String);
889+ pub fn remove(&mut self, byte_index: i32) -> char;
890+ pub fn repeat(&self, n: i32) -> String;
891+ pub fn replace(&self, from: String, to: String) -> String;
892+ pub fn replacen(&self, from: String, to: String, count: i32) -> String;
871893 pub fn from_iter<I: IntoIterator<Item = char>>(iter: I) -> String;
872894 pub fn from_utf8<I: IntoIterator<Item = u8>>(bytes: I) -> Result<String, String>;
873895 pub fn from_utf8_lossy<I: IntoIterator<Item = u8>>(bytes: I) -> String;
874896 pub fn from_utf8_unchecked<I: IntoIterator<Item = u8>>(bytes: I) -> String;
897+ pub fn split(&self, sep: String) -> StrSplitIter;
898+ pub fn splitn(&self, n: i32, sep: String) -> StrSplitNIter;
899+ pub fn split_whitespace(&self) -> StrSplitWhitespaceIter;
900+ pub fn lines(&self) -> StrLinesIter;
901+ pub fn char_indices(&self) -> StrCharIndicesIter;
875902}
876903
877904impl Add for String {
@@ -1033,20 +1060,36 @@ impl Array {
10331060 pub fn filled(n: i32, element: T) -> Array<T>;
10341061 pub fn len(&self) -> i32;
10351062 pub fn is_empty(&self) -> bool;
1063+ pub fn capacity(&self) -> i32;
10361064 pub fn internal_raw_data(&self) -> builtin::array<T>;
10371065 pub fn internal_from_raw(repr: builtin::array<T>, used: i32) -> Array<T>;
1066+ pub fn push(&mut self, value: T);
10381067 pub fn append(&mut self, value: T);
10391068 pub fn pop(&mut self) -> Option<T>;
1040- pub fn truncate(&mut self, len: i32) ;
1069+ pub fn first(& self) -> Option<T> ;
10411070 pub fn last(&self) -> Option<T>;
10421071 pub fn get(&self, index: i32) -> Option<T>;
1072+ pub fn insert(&mut self, index: i32, value: T);
1073+ pub fn remove(&mut self, index: i32) -> T;
1074+ pub fn swap(&mut self, a: i32, b: i32);
1075+ pub fn truncate(&mut self, len: i32);
1076+ pub fn clear(&mut self);
1077+ pub fn reserve(&mut self, additional: i32);
1078+ pub fn shrink_to_fit(&mut self);
1079+ pub fn extend(&mut self, other: &Array<T>);
1080+ pub fn reverse(&mut self);
1081+ pub fn repeat(&self, n: i32) -> Array<T>;
10431082 pub fn copy_within_append(&mut self, src_start: i32, count: i32);
1083+ pub fn contains(&self, value: &T) -> bool;
10441084 pub fn slice(&self, start: i32, end: i32) -> ArraySlice<T>;
10451085 pub fn iter(&self) -> ArrayIter<T>;
10461086 pub fn sort_by(&mut self, cmp: Fn(&T, &T) -> Ordering);
10471087 pub fn sorted_by(&self, cmp: Fn(&T, &T) -> Ordering) -> Array<T>;
1088+ pub fn windows(&self, size: i32) -> WindowsIter<T>;
1089+ pub fn chunks(&self, size: i32) -> ChunksIter<T>;
10481090 pub fn sort(&mut self);
10491091 pub fn sorted(&self) -> Array<T>;
1092+ pub fn join(&self, separator: String) -> String;
10501093}
10511094
10521095impl IndexValue<i32> for Array<T> {
0 commit comments