Skip to content

Commit 5e26869

Browse files
committed
fix CI
1 parent 96c3fcc commit 5e26869

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

ulist/python/ulist/ulist.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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: ...

ulist/src/string.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)