Skip to content

Commit

Permalink
Merge pull request #13 from xplshn/dev
Browse files Browse the repository at this point in the history
Polish truncate functions.
  • Loading branch information
xplshn committed Feb 27, 2024
2 parents 2fc4cda + 772a389 commit 0a0afbd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified bigdl
Binary file not shown.
2 changes: 1 addition & 1 deletion helperFunctions.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func truncateSprintf(format string, a ...interface{}) string {
formatted := fmt.Sprintf(format, a...)

// Determine the truncation length & truncate the formatted string if it exceeds the available space
availableSpace := getTerminalWidth() - 3
availableSpace := getTerminalWidth() - 4
if len(formatted) > availableSpace {
formatted = fmt.Sprintf("%s", formatted[:availableSpace])
for strings.HasSuffix(formatted, ",") || strings.HasSuffix(formatted, ".") || strings.HasSuffix(formatted, " ") {
Expand Down

0 comments on commit 0a0afbd

Please sign in to comment.