(total int)
| 15 | } |
| 16 | |
| 17 | func GetOffsetLength(total int) int { |
| 18 | length := 1 |
| 19 | for { |
| 20 | if total < 10 { |
| 21 | return length |
| 22 | } |
| 23 | total /= 10 |
| 24 | length++ |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | // GetLineOffset returns the 0-based line offset from a StartPosition. |
| 29 | // This is useful for converting from the 1-based StartPosition to the 0-based offset |
no outgoing calls
no test coverage detected