Skip to content

Commit

Permalink
♻️ refactor: update comments #2
Browse files Browse the repository at this point in the history
  • Loading branch information
pnguyen215 committed Oct 27, 2024
1 parent e846bef commit 35ff85e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func TrimWhitespace(s string) string {

// CleanSpaces removes leading and trailing whitespace characters from a given string and replaces sequences of whitespace characters with a single space.
// It first checks if the input string is empty or consists solely of whitespace characters. If so, it returns an empty string.
// Otherwise, it calls RemoveDuplicateWhitespace to replace all sequences of whitespace characters with a single space, effectively removing duplicates.
// Otherwise, it calls TrimWhitespace to replace all sequences of whitespace characters with a single space, effectively removing duplicates.
// Finally, it trims the leading and trailing whitespace characters from the resulting string using strings.TrimSpace and returns the cleaned string.
func CleanSpaces(s string) string {
if IsEmpty(s) {
Expand Down

0 comments on commit 35ff85e

Please sign in to comment.