Pudu programming language
Menu
API reference

Std.Fmt.truncated

1 declaration

fn

truncated: Str -> Int -> Str -> Str

This is a callable function.

What it does

Text cut to a width, ending in a marker when anything was removed.

The marker is counted inside the width, so the answer is never wider than

asked for. A width too small to hold the marker answers the marker cut to

the width, because a caller who asked for three columns gets three.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.

Back to Std.FmtSearch related declarations