[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Since not all characters have the same width, these functions let you check the width of a character. See section 32.17.1 Indentation Primitives, and 30.2.5 Motion by Screen Lines, for related functions.
If string does not reach width, then the result ends where string ends. If one multi-column character in string extends across the column width, that character is not included in the result. Thus, the result can fall short of width but cannot go beyond it.
The optional argument start-column specifies the starting column.
If this is non-nil
, then the first start-column columns of
the string are omitted from the value. If one multi-column character in
string extends across the column start-column, that
character is not included.
The optional argument padding, if non-nil
, is a padding
character added at the beginning and end of the result string, to extend
it to exactly width columns. The padding character is used at the
end of the result if it falls short of width. It is also used at
the beginning of the result if one multi-column character in
string extends across the column start-column.
(truncate-string-to-width "\tab\t" 12 4) => "ab" (truncate-string-to-width "\tab\t" 12 4 ?\ ) => " ab " |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |