Skip to content

Commit

Permalink
add fixme comments
Browse files Browse the repository at this point in the history
Signed-off-by: martinvuyk <[email protected]>
  • Loading branch information
martinvuyk committed Jan 2, 2025
1 parent 6687f6c commit 94d6fbb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stdlib/src/collections/string/string_slice.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ struct StringSlice[mut: Bool, //, origin: Origin[mut]](
"""
if end == -1:
return self.find(prefix, start) == start
# FIXME: use normalize_index
return Self(
ptr=self.unsafe_ptr() + start, length=end - start
).startswith(prefix)
Expand All @@ -872,6 +873,7 @@ struct StringSlice[mut: Bool, //, origin: Origin[mut]](
return False
if end == -1:
return self.rfind(suffix, start) + o_len == self.byte_length()
# FIXME: use normalize_index
return Self(ptr=self.unsafe_ptr() + start, length=end - start).endswith(
suffix
)
Expand All @@ -888,6 +890,7 @@ struct StringSlice[mut: Bool, //, origin: Origin[mut]](
A `StringSlice` borrowed from the current string containing the
characters of the slice starting at start.
"""
# FIXME: use normalize_index

var self_len = self.byte_length()

Expand Down

0 comments on commit 94d6fbb

Please sign in to comment.