File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -265,6 +265,7 @@ class StringList:
265265 def size (self ) -> int : ...
266266 def sort (self , ascending : bool ) -> None : ...
267267 def starts_with (self , elem : str ) -> BooleanList : ...
268+ def str_len (self ) -> IntegerList64 : ...
268269 def to_list (self ) -> List [Optional [str ]]: ...
269270 def union_all (self , other : LIST_RS ) -> LIST_RS : ...
270271 def unique (self ) -> StringList : ...
Original file line number Diff line number Diff line change @@ -136,6 +136,12 @@ impl StringList {
136136 BooleanList :: new ( vec, HashSet :: new ( ) )
137137 }
138138
139+ pub fn str_len ( & self ) -> IntegerList64 {
140+ let mut vec = self . values ( ) . iter ( ) . map ( |x| x. len ( ) as i64 ) . collect ( ) ;
141+ _fill_na ( & mut vec, self . na_indexes ( ) , 0 ) ;
142+ IntegerList64 :: new ( vec, self . na_indexes ( ) . clone ( ) )
143+ }
144+
139145 pub fn to_list ( & self ) -> Vec < Option < String > > {
140146 List :: to_list ( self )
141147 }
You can’t perform that action at this time.
0 commit comments