'\" t .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" .TH Text.without_suffix 3 2025-11-29 "Tomo man-pages" .SH NAME Text.without_suffix \- remove suffix .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf .BI Text.without_suffix\ :\ func(text:\ Text,\ suffix:\ Text\ ->\ Text) .fi .SH DESCRIPTION Returns the text with a given suffix removed (if present). .SH ARGUMENTS .TS allbox; lb lb lbx l l l. Name Type Description text Text The text to remove the suffix from. suffix Text The suffix to remove. .TE .SH RETURN A text without the given suffix (if present) or the unmodified text if the suffix is not present. .SH EXAMPLES .EX assert "baz.foo".without_suffix(".foo") == "baz" assert "qux".without_suffix(".foo") == "qux" .EE .SH SEE ALSO .BR Tomo-Text (3)