wordpress-mobile / wordpress-mobile/WordPress-Android
The `getWordCount` method should return 0 when given an empty string
Open
Beginner friendly
Nobody has claimed this yet.
[Type] Bug
Posting/Editing
- Dominant language
- Kotlin
- Stars
- 3.2k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 69
Description
Currently it returns 1 when the string is empty. Word count precision is not super important, except for empty posts (we would like to count them).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in WordPress/src/main/java/org/wordpress/android/util/analytics/AnalyticsUtils.java at getWordCount, referenced by the issue. Check the current empty-string behavior and make the smallest change needed so an empty string returns 0; done means the method returns 0 for empty input without changing the stated behavior for other strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100