Skip to content

Commit c457c3b

Browse files
bartekpaciaintellij-monorepo-bot
authored andcommitted
[cucumber] CucumberUtil: add some Javadoc
GitOrigin-RevId: 0fdb69c0dea81d73c60595490b831d927eb4ccfa
1 parent 340cfa9 commit c457c3b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cucumber/src/org/jetbrains/plugins/cucumber/CucumberUtil.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,15 @@ else if (inAlternativeGroup && Character.isWhitespace(currentChar)) {
325325
return ranges;
326326
}
327327

328+
/// Given a string and a list of text ranges, this method extracts the portions of the string
329+
/// that lie outside the provided ranges and returns them as a list.
330+
///
331+
/// Example input:
332+
/// - cukex: `"I have {int} cucumbers"`
333+
/// - ranges: `[TextRange(7,12)]` (the range covering `{int}`)
334+
///
335+
///
336+
/// Example output: `["I have ", " cucumbers"]`
328337
public static @NotNull List<String> textRangesOutsideToSubstrings(String cukex, @NotNull List<TextRange> ranges) {
329338
List<String> result = new ArrayList<>();
330339
int lastStart = 0;

0 commit comments

Comments
 (0)