From 3fc3dd875b951dfa0fd886a15139c842e4eb9440 Mon Sep 17 00:00:00 2001 From: benjGam Date: Fri, 27 Sep 2024 11:29:21 +0200 Subject: [PATCH 01/27] chore(npm-ignore): remove unused files from NPM publish --- .npmignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.npmignore b/.npmignore index c7ceb10..60b47a5 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,7 @@ node_modules/ package-lock.json src/ +.github/ +coverage/ +test/ tsconfig.json \ No newline at end of file From cabd5534de6565109c9394d451d52e99c7092c2a Mon Sep 17 00:00:00 2001 From: benjGam Date: Fri, 27 Sep 2024 11:29:44 +0200 Subject: [PATCH 02/27] chore(version): 2.4.0 -> 2.4.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68593fc..799fc28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "string-utils-ts", - "version": "2.4.0", + "version": "2.4.1", "description": "Provide some useful functions for strings", "main": "./lib", "scripts": { From 8142286b9dad524b172f358b7c6b79a9752f8acd Mon Sep 17 00:00:00 2001 From: benjGam Date: Fri, 27 Sep 2024 11:30:47 +0200 Subject: [PATCH 03/27] docs(CHANGELOG): add 'Version 2.4.1' section --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef07a89..8a408b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# Version 2.4.1 + +- `Patch`: + - Remove useless files from package (When `npm publish` is performed) + # Version 2.4.0 - `Added`: From 9040b3d341c7566c67b8d04c0c2d08fb0b2605b5 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:11:14 +0100 Subject: [PATCH 04/27] test: add test for getting first char in string --- test/main.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/main.spec.ts b/test/main.spec.ts index 5570b47..c43722c 100644 --- a/test/main.spec.ts +++ b/test/main.spec.ts @@ -71,3 +71,12 @@ runner.runBasicTests( [' '.split(' '), false], ]), ); + +runner.runBasicTests( + StringUtils.getFirstCharIndex, + new Map([ + [' this is a sentence', 3], + ['this is a sentence', 0], + ['!!this', 2], + ]), +); From c0045a455d3c48772eded33b9dfb5fd9860fa27a Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:14:34 +0100 Subject: [PATCH 05/27] fix: add test case --- test/main.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/main.spec.ts b/test/main.spec.ts index c43722c..f7a6d0d 100644 --- a/test/main.spec.ts +++ b/test/main.spec.ts @@ -78,5 +78,6 @@ runner.runBasicTests( [' this is a sentence', 3], ['this is a sentence', 0], ['!!this', 2], + ['!!!', -1], ]), ); From 8e1e640650050769ef2bdf30008af745e3f273f9 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:18:31 +0100 Subject: [PATCH 06/27] feat: implement 'getFirstCharIndex' logic --- src/main.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main.ts b/src/main.ts index 06a5cd0..066544c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -162,4 +162,21 @@ export class StringUtils { return revelantSubSequences; } + + /** + * Returns the index of the first char + * + * + * @param string - The string to search in + */ + + public static getFirstCharIndex(string: string) { + const alphabet = 'abcdefghijklmnopqrstuvwxyz'; + string = string.toLowerCase(); + + for (const charIndex in string.split('')) { + if (alphabet.includes(string[charIndex])) return +charIndex; + } + return -1; + } } From 269d3b38433ccbea650f847c52bb1716077c52da Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:26:26 +0100 Subject: [PATCH 07/27] docs: fix doc example --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 066544c..566def9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -89,7 +89,7 @@ export class StringUtils { * str: 'Test' * index: '2' * toReplaceWith: 'hello' - * returns: 'Tehellost' + * returns: 'Tehellot' */ public static replaceAt( str: string, From 074c67eb1f9d3a7ef880ba84f0bb51b48bc48681 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:29:27 +0100 Subject: [PATCH 08/27] test: implement test for 'normalizeSentence' method --- test/words.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/words.spec.ts b/test/words.spec.ts index e5b63e7..a626d76 100644 --- a/test/words.spec.ts +++ b/test/words.spec.ts @@ -143,4 +143,14 @@ describe('Normalization of stuffs', () => { ['s', ''], ]), ); + + runner.runBasicTests( + StringUtilsWord.normalizeSentence, + new Map([ + [' this is a sentence', 'This is a sentence.'], + [' ', ' '], + [' !!!!!! hello you', 'Hello you.'], + [' a !!!! story', 'A !!!! story.'], + ]), + ); }); From d55183feed7d0c67a7af7db81e7a96d8756869ce Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:35:53 +0100 Subject: [PATCH 09/27] feat: implement 'normalizeSentence' logic --- src/word/utils.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/word/utils.ts b/src/word/utils.ts index 1d4a533..9507f2b 100644 --- a/src/word/utils.ts +++ b/src/word/utils.ts @@ -227,4 +227,28 @@ export default class StringUtilsWord { .map((subSequence) => this.formatWord(subSequence)) .join(' '); } + + /** + * + * Returns a dot at end of sentence & first word char uppered. + * + * @param sentence - A sentence in a string + * + * @example + * sentence: ' this is a sentence' + * returns: 'This is a sentence.' + */ + public static normalizeSentence(sentence: string): string { + const firstCharIndex = StringUtils.getFirstCharIndex(sentence); + if (firstCharIndex == -1) + // There's no char in given string + return sentence; + sentence = this.normalizeSpacesBetweenWords( + sentence.substring(firstCharIndex, sentence.length), + ); + const arrayOfSentence = sentence.split(''); + sentence = sentence.toLowerCase(); + arrayOfSentence[0] = arrayOfSentence[0].toUpperCase(); + return `${arrayOfSentence.join('')}.`; + } } From 0b90bd6ac11acda4cfb00091fd62fd816736bfc6 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:39:26 +0100 Subject: [PATCH 10/27] docs: update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a408b6..bb398c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# Version 2.5.0 [ON-GOING] + +- `Added`: + - `getFirstCharIndex(string: string): number` method has been implemented. + - `normalizeSentence(sentence: string): string` method has been implemented, this method is used to upper the first word char & lower the rest of them & append a dot at the end of it. + # Version 2.4.1 - `Patch`: From 215e4bf374108619ef558a4e656223a5f64bf617 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:41:02 +0100 Subject: [PATCH 11/27] fix: add test case --- test/words.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/words.spec.ts b/test/words.spec.ts index a626d76..9567764 100644 --- a/test/words.spec.ts +++ b/test/words.spec.ts @@ -151,6 +151,7 @@ describe('Normalization of stuffs', () => { [' ', ' '], [' !!!!!! hello you', 'Hello you.'], [' a !!!! story', 'A !!!! story.'], + [' This is a story.', 'This is a story.'], ]), ); }); From 273ef528261576ab6686ad864a64a017b9328588 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:46:28 +0100 Subject: [PATCH 12/27] test: add test cases which break actual logic --- test/words.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/words.spec.ts b/test/words.spec.ts index 9567764..6e9467d 100644 --- a/test/words.spec.ts +++ b/test/words.spec.ts @@ -152,6 +152,8 @@ describe('Normalization of stuffs', () => { [' !!!!!! hello you', 'Hello you.'], [' a !!!! story', 'A !!!! story.'], [' This is a story.', 'This is a story.'], + ['This is a story !', 'This is a story !'], + ['Is this a story ?', 'Is this a story ?'], ]), ); }); From 2659880f32389970bf58d8474323a741cf22ebae Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 03:57:00 +0100 Subject: [PATCH 13/27] test: add test for 'getFirstEndingPunctionChar' method --- test/main.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/main.spec.ts b/test/main.spec.ts index f7a6d0d..6f14da8 100644 --- a/test/main.spec.ts +++ b/test/main.spec.ts @@ -81,3 +81,17 @@ runner.runBasicTests( ['!!!', -1], ]), ); + +runner.runBasicTests( + StringUtils.getFirstEndingPunctuationChar, + new Map([ + ['!', 0], + ['This', -1], + ['This ?', 5], + ['This !', 5], + ['This.', 4], + ['!This', 0], + ['This;', 4], + ['', -1], + ]), +); From 47253a4ca02fa460553916349fbf25e74a534fe8 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:00:03 +0100 Subject: [PATCH 14/27] feat: implement 'getFirstEndingPunctuationChar' logic --- src/main.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 566def9..5bc91e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -169,7 +169,6 @@ export class StringUtils { * * @param string - The string to search in */ - public static getFirstCharIndex(string: string) { const alphabet = 'abcdefghijklmnopqrstuvwxyz'; string = string.toLowerCase(); @@ -179,4 +178,15 @@ export class StringUtils { } return -1; } + + /** + * Returns the index of the ending punctuation char + * + * @param string - The sting to search in + * + */ + public static getFirstEndingPunctuationChar(string: string) { + const toSearch = '?!;.'; + return string.split('').findIndex((char) => toSearch.includes(char)); + } } From 07cce0923cf1a7f2ba6051ed4ff9d82693613005 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:03:03 +0100 Subject: [PATCH 15/27] fix: rework 'normalizeSentence' behavior to work correctly --- src/word/utils.ts | 2 +- test/words.spec.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/word/utils.ts b/src/word/utils.ts index 9507f2b..ba2514f 100644 --- a/src/word/utils.ts +++ b/src/word/utils.ts @@ -249,6 +249,6 @@ export default class StringUtilsWord { const arrayOfSentence = sentence.split(''); sentence = sentence.toLowerCase(); arrayOfSentence[0] = arrayOfSentence[0].toUpperCase(); - return `${arrayOfSentence.join('')}.`; + return `${arrayOfSentence.join('')}${StringUtils.getFirstEndingPunctuationChar(sentence) == sentence.length - 1 ? '' : '.'}`; } } diff --git a/test/words.spec.ts b/test/words.spec.ts index 6e9467d..898c356 100644 --- a/test/words.spec.ts +++ b/test/words.spec.ts @@ -154,6 +154,7 @@ describe('Normalization of stuffs', () => { [' This is a story.', 'This is a story.'], ['This is a story !', 'This is a story !'], ['Is this a story ?', 'Is this a story ?'], + ['Is this a story ? No', 'Is this a story ? No.'], ]), ); }); From 02cc2bae64f404bba90c75b1116b53da665119d3 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:06:59 +0100 Subject: [PATCH 16/27] refactor: use 'findIndex' instead of a messy loop --- src/main.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main.ts b/src/main.ts index 5bc91e8..19d8a80 100644 --- a/src/main.ts +++ b/src/main.ts @@ -170,13 +170,12 @@ export class StringUtils { * @param string - The string to search in */ public static getFirstCharIndex(string: string) { - const alphabet = 'abcdefghijklmnopqrstuvwxyz'; - string = string.toLowerCase(); + const toSearch = 'abcdefghijklmnopqrstuvwxyz'; - for (const charIndex in string.split('')) { - if (alphabet.includes(string[charIndex])) return +charIndex; - } - return -1; + return string + .toLowerCase() + .split('') + .findIndex((char) => toSearch.includes(char)); } /** From 833fa4df2dd895549b79910051cb8919551b2453 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:15:44 +0100 Subject: [PATCH 17/27] style: fix typo in TSDoc --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 19d8a80..e84c78e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -181,7 +181,7 @@ export class StringUtils { /** * Returns the index of the ending punctuation char * - * @param string - The sting to search in + * @param string - The string to search in * */ public static getFirstEndingPunctuationChar(string: string) { From d5319c62e6775dd2ee6e99c9e0c2f199c2d48029 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:25:38 +0100 Subject: [PATCH 18/27] test: add test for 'getFirstIndexOfUnfullyDeterminated' --- test/main.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/main.spec.ts b/test/main.spec.ts index 6f14da8..fe31c10 100644 --- a/test/main.spec.ts +++ b/test/main.spec.ts @@ -95,3 +95,14 @@ runner.runBasicTests( ['', -1], ]), ); + +runner.runBasicTests( + StringUtils.getFirstIndexOfUnfullyDeterminated, + new Map<[string, string], number>([ + [['test', 'te'], 0], + [['', ''], -1], + [['hello', 'o'], 4], + [['hey ', ' '], 3], + [['bouh', 'hello'], 2], + ]), +); From 16ecbd6579976da63a37047302fb0b0c453daf48 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:29:01 +0100 Subject: [PATCH 19/27] fix: fix test --- test/main.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/main.spec.ts b/test/main.spec.ts index fe31c10..d32f6d5 100644 --- a/test/main.spec.ts +++ b/test/main.spec.ts @@ -98,11 +98,11 @@ runner.runBasicTests( runner.runBasicTests( StringUtils.getFirstIndexOfUnfullyDeterminated, - new Map<[string, string], number>([ - [['test', 'te'], 0], - [['', ''], -1], - [['hello', 'o'], 4], - [['hey ', ' '], 3], - [['bouh', 'hello'], 2], + new Map([ + [() => ['test', 'te'], 0], + [() => ['', ''], -1], + [() => ['hello', 'o'], 4], + [() => ['hey ', ' '], 3], + [() => ['bouh', 'hello'], 1], ]), ); From ea2a12e01b81ebbbb6152f87d3bd5744514ca193 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:29:56 +0100 Subject: [PATCH 20/27] feat: implement 'getFirstIndexOfUnfullyDeterminated' logic --- src/main.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.ts b/src/main.ts index e84c78e..7c3589d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -188,4 +188,15 @@ export class StringUtils { const toSearch = '?!;.'; return string.split('').findIndex((char) => toSearch.includes(char)); } + + /** + * Returns first index of a given set of char in a given string + * + */ + public static getFirstIndexOfUnfullyDeterminated( + string: string, + toSearch: string | string[], + ): number { + return string.split('').findIndex((char) => toSearch.includes(char)); + } } From 81bdb6573120565dd7f8a6f8c299cbc8f08c4beb Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:35:06 +0100 Subject: [PATCH 21/27] refactor: use 'getFirstIndexOfUnfullyDeterminated' logic instead of rewriting it --- src/main.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main.ts b/src/main.ts index 7c3589d..2ba9a06 100644 --- a/src/main.ts +++ b/src/main.ts @@ -170,12 +170,10 @@ export class StringUtils { * @param string - The string to search in */ public static getFirstCharIndex(string: string) { - const toSearch = 'abcdefghijklmnopqrstuvwxyz'; - - return string - .toLowerCase() - .split('') - .findIndex((char) => toSearch.includes(char)); + return this.getFirstIndexOfUnfullyDeterminated( + string.toLowerCase(), + 'abcdefghijklmnopqrstuvwxyz', + ); } /** @@ -185,8 +183,7 @@ export class StringUtils { * */ public static getFirstEndingPunctuationChar(string: string) { - const toSearch = '?!;.'; - return string.split('').findIndex((char) => toSearch.includes(char)); + return this.getFirstIndexOfUnfullyDeterminated(string, '?!;.'); } /** From abbc44f8aefeb2e28930978e3c71dd74cf0dfcd8 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:35:48 +0100 Subject: [PATCH 22/27] fix typo for runner utils --- test/test.utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.utils.ts b/test/test.utils.ts index 21935cb..9416cd1 100644 --- a/test/test.utils.ts +++ b/test/test.utils.ts @@ -17,7 +17,7 @@ export default class JestRunner { this.checkInvokation(fn); for (const [input, output] of expectedReturns.entries()) { - test(`[${fn.name}] Should return '${output} for '${input}''`, () => { + test(`[${fn.name}] Should return '${output}' for '${input}''`, () => { (inputPropertiesToTestName && output ? expect( this._classToInvoke[fn.name]( From d0ea92181a95e7252dd5ae262d344ca201a497d6 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 04:38:47 +0100 Subject: [PATCH 23/27] docs: add methods implementation --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb398c5..7a03ebc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ - `Added`: - `getFirstCharIndex(string: string): number` method has been implemented. - `normalizeSentence(sentence: string): string` method has been implemented, this method is used to upper the first word char & lower the rest of them & append a dot at the end of it. + - `getPunctuationCharIndex(string: string): number` method has been implemented. + - `getIndexOfUnfullyDeterminated(string: string, toSearch: string | string[]): number` method has been implement to get the first index of a given set of (only one) char in a given string. # Version 2.4.1 From 71184dadcecf23ece285446ac6ce18ea02913667 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 09:27:15 +0100 Subject: [PATCH 24/27] docs: fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a03ebc..37468f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - `getFirstCharIndex(string: string): number` method has been implemented. - `normalizeSentence(sentence: string): string` method has been implemented, this method is used to upper the first word char & lower the rest of them & append a dot at the end of it. - `getPunctuationCharIndex(string: string): number` method has been implemented. - - `getIndexOfUnfullyDeterminated(string: string, toSearch: string | string[]): number` method has been implement to get the first index of a given set of (only one) char in a given string. + - `getIndexOfUnfullyDeterminated(string: string, toSearch: string | string[]): number` method has been implemented to get the first index of a given set of (only one) char in a given string. # Version 2.4.1 From 0e1f68da1dc67c2b36cba264e68a41d85d202774 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 09:31:12 +0100 Subject: [PATCH 25/27] style: change method name 'getFirstEndingPunctuationChar' -> 'getFirstEndingPunctuationIndex' --- src/main.ts | 4 ++-- src/word/utils.ts | 2 +- test/main.spec.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 2ba9a06..51f9ff1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -177,12 +177,12 @@ export class StringUtils { } /** - * Returns the index of the ending punctuation char + * Returns the index of the ending punctuation char index * * @param string - The string to search in * */ - public static getFirstEndingPunctuationChar(string: string) { + public static getFirstEndingPunctuationIndex(string: string) { return this.getFirstIndexOfUnfullyDeterminated(string, '?!;.'); } diff --git a/src/word/utils.ts b/src/word/utils.ts index ba2514f..f54dffd 100644 --- a/src/word/utils.ts +++ b/src/word/utils.ts @@ -249,6 +249,6 @@ export default class StringUtilsWord { const arrayOfSentence = sentence.split(''); sentence = sentence.toLowerCase(); arrayOfSentence[0] = arrayOfSentence[0].toUpperCase(); - return `${arrayOfSentence.join('')}${StringUtils.getFirstEndingPunctuationChar(sentence) == sentence.length - 1 ? '' : '.'}`; + return `${arrayOfSentence.join('')}${StringUtils.getFirstEndingPunctuationIndex(sentence) == sentence.length - 1 ? '' : '.'}`; } } diff --git a/test/main.spec.ts b/test/main.spec.ts index d32f6d5..99b356b 100644 --- a/test/main.spec.ts +++ b/test/main.spec.ts @@ -83,7 +83,7 @@ runner.runBasicTests( ); runner.runBasicTests( - StringUtils.getFirstEndingPunctuationChar, + StringUtils.getFirstEndingPunctuationIndex, new Map([ ['!', 0], ['This', -1], From e43df814a123b7b65ed7b5e67a340566a42e0b56 Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 09:38:27 +0100 Subject: [PATCH 26/27] docs: update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37468f2..9deefb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ - `Added`: - `getFirstCharIndex(string: string): number` method has been implemented. - `normalizeSentence(sentence: string): string` method has been implemented, this method is used to upper the first word char & lower the rest of them & append a dot at the end of it. - - `getPunctuationCharIndex(string: string): number` method has been implemented. + - `getFirstCharIndex(string: string)` method has been implemented. + - `getFirstEndingPunctuationIndex(string: string): number` method has been implemented. - `getIndexOfUnfullyDeterminated(string: string, toSearch: string | string[]): number` method has been implemented to get the first index of a given set of (only one) char in a given string. # Version 2.4.1 From 7c6d1b74ff90fba8494cabec4da7bfc4549dd4ee Mon Sep 17 00:00:00 2001 From: benjGam Date: Wed, 30 Oct 2024 09:40:33 +0100 Subject: [PATCH 27/27] chore(version): '2.4.1' -> '2.5.0' --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 799fc28..b44becc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "string-utils-ts", - "version": "2.4.1", + "version": "2.5.0", "description": "Provide some useful functions for strings", "main": "./lib", "scripts": {