Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1018864 // Test extractLastNLinesOfString (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (5836L/41K).

!7

p-exp {
  for (int i = 1; i <= 2; i++) {
    assertEqualsVerbose("bla", extractLastNLinesOfString(i, "bla"));
    assertEqualsVerbose("bla\n", extractLastNLinesOfString(i, "bla\n"));
  }
  assertEqualsVerbose("blubb", extractLastNLinesOfString(1, "bla\nblubb"));
  for (int i = 2; i <= 3; i++)
    assertEqualsVerbose("bla\nblubb", extractLastNLinesOfString(print(i), "bla\nblubb"));
  assertEqualsVerbose("bla\nblubb", extractLastNLinesOfString(2, "ya\n\nbla\nblubb"));
  assertEqualsVerbose("\nbla\nblubb", extractLastNLinesOfString(3, "ya\n\nbla\nblubb"));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018864
Snippet name: Test extractLastNLinesOfString (OK)
Eternal ID of this version: #1018864/3
Text MD5: 9368efb4c73389a3f8fcea40ef4e4143
Transpilation MD5: e7ba2bea465697affb1846e8e095d2dd
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-14 18:06:48
Source code size: 577 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 433 / 1127
Version history: 2 change(s)
Referenced in: [show references]