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

33
LINES

< > BotCompany Repo | #1027375 // Fluid Text File Spike [shortened]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (4788L/25K).

!7

cmodule FluidTextFileSpike > DynPrintLog {
  switchable int maxRefLength = 8;

  transient S demoContent = autoUnindent_mls([=[
    refs="at *", name="index" [[
      entry 1 at abc
      entry 2 at def
    ]]
    i=abc [[hello]]
    i=def [[world]]
  ]=]);

  start-thread {
    print(demoContent);
    S out = cleanIt(demoContent, false);
    print_withNLBefore(out);
    assertEquals("Idempotency", out, cleanIt(out, false));
    print("OK");
  }

  S cleanIt(S content, bool verbose) {
    new CleanFluidTextFile cleaner;
    cleaner.verbose = verbose;
    cleaner.maxRefLength = maxRefLength;
    cleaner.reader = stringReader(content);
    new StringWriter writer;
    cleaner.writer = writer;
    cleaner.run();
    ret str(writer);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027375
Snippet name: Fluid Text File Spike [shortened]
Eternal ID of this version: #1027375/8
Text MD5: 4a9636973cecafc040ed978e52943167
Transpilation MD5: 01e11d8b28d75a5e9df9387635229738
Author: stefan
Category:
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-15 16:54:16
Source code size: 749 bytes / 33 lines
Pitched / IR pitched: No / No
Views / Downloads: 138 / 468
Version history: 7 change(s)
Referenced in: [show references]