strings.Trim does not show the last character


I am using the strings.Trim to show only the relevant information but it doesn’t show the last character.

FilePath := strings.Trim(filepath, "C:://users//123//") 
The output will be : File_123.tx (it's missing the last "t") ```

so is there a way that I can get the full name?

Do you want to have file path.Base?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.