Skip to content

Commit 06c0961

Browse files
committed
fix typos
1 parent 88f9ab9 commit 06c0961

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

extractor/src/main/java/org/schabi/newpipe/extractor/utils/Utils.java

+10-3
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,20 @@ public static long mixedNumberWordToLong(String numberWord) throws NumberFormatE
9393
}
9494
}
9595

96-
public static String cleanWhiteSpaces(String s) {
96+
public static String removeWhiteSpaces(String s) {
9797
return s.replaceAll("(\\s| | )", "");
9898
}
9999

100-
//does the same as the function above, but for the 80 languages supported by YouTube.
100+
/**
101+
* Does the same as {@link #mixedNumberWordToLong(String)}, but for the 80 languages supported by YouTube.
102+
*
103+
* @param numberWord
104+
* @param loc
105+
* @return
106+
* @throws ParsingException
107+
*/
101108
public static long mixedNumberWordToLong(String numberWord, Localization loc) throws ParsingException {
102-
numberWord = cleanWhiteSpaces(numberWord);
109+
numberWord = removeWhiteSpaces(numberWord);
103110
String langCode = loc.getLanguageCode();
104111
String abbreviation = removeNumber(numberWord);
105112

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSubcriberTest.java renamed to extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSubscriberTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@
2222
import static org.junit.Assert.assertEquals;
2323
import static org.schabi.newpipe.extractor.ServiceList.YouTube;
2424
import static org.schabi.newpipe.extractor.localization.AbbreviationHelper.abbreviationSubscribersCount;
25-
import static org.schabi.newpipe.extractor.utils.Utils.cleanWhiteSpaces;
2625
import static org.schabi.newpipe.extractor.utils.Utils.removeNumber;
26+
import static org.schabi.newpipe.extractor.utils.Utils.removeWhiteSpaces;
2727

2828
/**
2929
* A class that tests abbreviations and subscriber counts for all the languages YouTube supports.
3030
*/
3131
@Ignore("Should be ran manually from time to time, as it's too time consuming.")
32-
public class YoutubeSubcriberTest {
32+
public class YoutubeSubscriberTest {
3333

3434
private static final String url = "https://www.youtube.com/feed/guide_builder";
3535
private static final int PAUSE_DURATION_EXTRACTORS = 250;
3636
private static final int PAUSE_DURATION_ABBREVIATIONS = 125;
3737

3838
public static String getAbbreviation(String count) {
39-
return removeNumber(cleanWhiteSpaces(count));
39+
return removeNumber(removeWhiteSpaces(count));
4040
}
4141

4242
public static void assertEqualsWithEnglish(String channelUrl) throws ExtractionException, IOException, InterruptedException {

0 commit comments

Comments
 (0)