/dports/devel/git-delta/delta-0.9.2/src/ansi/ |
H A D | console_tests.rs | 22 use crate::ansi::{measure_text_width, truncate_str}; 39 &truncate_str(&s, 5, ""), in test_truncate_str() 49 &truncate_str(&s, 5, "!"), in test_truncate_str() 54 &truncate_str(&s, 10, "..."), in test_truncate_str() 59 &truncate_str(&s, 5, ""), in test_truncate_str() 64 &truncate_str(&s, 6, ""), in test_truncate_str() 71 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 72 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 73 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
H A D | mod.rs | 36 pub fn truncate_str<'a, 'b>(s: &'a str, display_width: usize, tail: &'b str) -> Cow<'a, str> { in truncate_str() function 43 truncate_str(tail, display_width, "").to_string() in truncate_str() 133 string_starts_with_ansi_style_sequence, strip_ansi_codes, truncate_str, 213 assert_eq!(truncate_str("1", 1, ""), "1"); in test_truncate_str() 214 assert_eq!(truncate_str("12", 1, ""), "1"); in test_truncate_str() 215 assert_eq!(truncate_str("123", 2, "s"), "1s"); in test_truncate_str() 216 assert_eq!(truncate_str("123", 2, "→"), "1→"); in test_truncate_str() 217 assert_eq!(truncate_str("12ݶ", 1, "ݶ"), "ݶ"); in test_truncate_str()
|
/dports/textproc/turboxsl/turboxsl-b03c2c9/src/zlog/src/ |
H A D | buf.c | 73 a_buf->truncate_str, in zlog_buf_profile() 87 zlog_buf_t *zlog_buf_new(size_t buf_size_min, size_t buf_size_max, const char *truncate_str) in zlog_buf_new() argument 108 if (truncate_str) { in zlog_buf_new() 109 if (strlen(truncate_str) > sizeof(a_buf->truncate_str) - 1) { in zlog_buf_new() 110 zc_error("truncate_str[%s] overflow", truncate_str); in zlog_buf_new() 113 strcpy(a_buf->truncate_str, truncate_str); in zlog_buf_new() 115 a_buf->truncate_str_len = strlen(truncate_str); in zlog_buf_new() 146 if ((a_buf->truncate_str)[0] == '\0') return; in zlog_buf_truncate() 150 memcpy(p, a_buf->truncate_str, len); in zlog_buf_truncate()
|
H A D | buf.h | 31 char truncate_str[MAXLEN_PATH + 1]; member 36 zlog_buf_t *zlog_buf_new(size_t min, size_t max, const char *truncate_str);
|
/dports/databases/beansdb/beansdb-0.7.1.4/third-party/zlog-1.2/ |
H A D | buf.c | 73 a_buf->truncate_str, in zlog_buf_profile() 87 zlog_buf_t *zlog_buf_new(size_t buf_size_min, size_t buf_size_max, const char *truncate_str) in zlog_buf_new() argument 108 if (truncate_str) { in zlog_buf_new() 109 if (strlen(truncate_str) > sizeof(a_buf->truncate_str) - 1) { in zlog_buf_new() 110 zc_error("truncate_str[%s] overflow", truncate_str); in zlog_buf_new() 113 strcpy(a_buf->truncate_str, truncate_str); in zlog_buf_new() 115 a_buf->truncate_str_len = strlen(truncate_str); in zlog_buf_new() 146 if ((a_buf->truncate_str)[0] == '\0') return; in zlog_buf_truncate() 150 memcpy(p, a_buf->truncate_str, len); in zlog_buf_truncate()
|
H A D | buf.h | 31 char truncate_str[MAXLEN_PATH + 1]; member 36 zlog_buf_t *zlog_buf_new(size_t min, size_t max, const char *truncate_str);
|
/dports/textproc/cast2gif/cast2gif-0.1.0/cargo-crates/console-0.10.0/src/ |
H A D | utils.rs | 561 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 661 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 707 &truncate_str(&s, 5, ""), in test_truncate_str() 712 &truncate_str(&s, 5, "!"), in test_truncate_str() 717 &truncate_str(&s, 10, "..."), in test_truncate_str() 722 &truncate_str(&s, 5, ""), in test_truncate_str() 727 &truncate_str(&s, 6, ""), in test_truncate_str() 734 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 735 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 736 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
H A D | lib.rs | 82 colors_enabled, measure_text_width, pad_str, set_colors_enabled, style, truncate_str,
|
/dports/sysutils/diskonaut/diskonaut-0.11.0/cargo-crates/console-0.10.3/src/ |
H A D | utils.rs | 603 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 703 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 749 &truncate_str(&s, 5, ""), in test_truncate_str() 754 &truncate_str(&s, 5, "!"), in test_truncate_str() 759 &truncate_str(&s, 10, "..."), in test_truncate_str() 764 &truncate_str(&s, 5, ""), in test_truncate_str() 769 &truncate_str(&s, 6, ""), in test_truncate_str() 776 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 777 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 778 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
H A D | lib.rs | 82 colors_enabled, measure_text_width, pad_str, set_colors_enabled, style, truncate_str,
|
/dports/devel/stylua/StyLua-0.11.0/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/multimedia/librav1e/rav1e-0.5.1/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/multimedia/rav1e/rav1e-0.5.1/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/devel/git-delta/delta-0.9.2/cargo-crates/console-0.15.0/src/ |
H A D | utils.rs | 718 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 818 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 866 &truncate_str(&s, 5, ""), in test_truncate_str() 871 &truncate_str(&s, 5, "!"), in test_truncate_str() 876 &truncate_str(&s, 10, "..."), in test_truncate_str() 881 &truncate_str(&s, 5, ""), in test_truncate_str() 886 &truncate_str(&s, 6, ""), in test_truncate_str() 893 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 894 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 895 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/textproc/angle-grinder/angle-grinder-0.18.0/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/lang/gleam/gleam-0.18.2/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/devel/texlab/texlab-3.3.0/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/devel/cargo-generate/cargo-generate-0.9.0/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/www/xh/xh-0.14.1/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/benchmarks/hyperfine/hyperfine-1.12.0/cargo-crates/console-0.15.0/src/ |
H A D | utils.rs | 718 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 818 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 866 &truncate_str(&s, 5, ""), in test_truncate_str() 871 &truncate_str(&s, 5, "!"), in test_truncate_str() 876 &truncate_str(&s, 10, "..."), in test_truncate_str() 881 &truncate_str(&s, 5, ""), in test_truncate_str() 886 &truncate_str(&s, 6, ""), in test_truncate_str() 893 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 894 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 895 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/textproc/bat/bat-0.18.3/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/devel/sentry-cli/sentry-cli-1.71.0/cargo-crates/console-0.14.1/src/ |
H A D | utils.rs | 706 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 806 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 852 &truncate_str(&s, 5, ""), in test_truncate_str() 857 &truncate_str(&s, 5, "!"), in test_truncate_str() 862 &truncate_str(&s, 10, "..."), in test_truncate_str() 867 &truncate_str(&s, 5, ""), in test_truncate_str() 872 &truncate_str(&s, 6, ""), in test_truncate_str() 879 assert_eq!(&truncate_str("foo bar", 5, ""), "foo b"); in test_truncate_str_no_ansi() 880 assert_eq!(&truncate_str("foo bar", 5, "!"), "foo !"); in test_truncate_str_no_ansi() 881 assert_eq!(&truncate_str("foo bar baz", 10, "..."), "foo bar..."); in test_truncate_str_no_ansi()
|
/dports/mail/perdition/perdition-2.2/perdition/db/postgresql/ |
H A D | perditiondb_postgresql.c | 186 static int truncate_str(char *str, const char c){ in truncate_str() function 299 truncate_str(servername, ' '); in dbserver_get() 311 truncate_str(port, ' '); in dbserver_get()
|
/dports/textproc/cast2gif/cast2gif-0.1.0/cargo-crates/console-0.9.2/src/ |
H A D | utils.rs | 631 pub fn truncate_str<'a>(s: &'a str, width: usize, tail: &str) -> Cow<'a, str> { in truncate_str() function 712 Some(tail) => truncate_str(s, width, tail), in pad_str_with() 751 &truncate_str(&s, 5, ""), in test_truncate_str() 756 &truncate_str(&s, 5, "!"), in test_truncate_str() 761 &truncate_str(&s, 10, "..."), in test_truncate_str() 766 &truncate_str(&s, 5, ""), in test_truncate_str() 771 &truncate_str(&s, 6, ""), in test_truncate_str()
|
H A D | lib.rs | 74 truncate_str, Alignment, AnsiCodeIterator, Attribute, Color, Emoji, Style, StyledObject,
|