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

7
LINES

< > TinyBrain | #1013630 - possiblyIsEvenIndent - is text indented with even spaces?

JavaX fragment (include)

static bool possiblyIsEvenIndent(S s) {
  for (S line : lines(s)) {
    S indent = getLeadingSpaces(line);
    if (!allSpaces(indent) || odd(l(indent))) false;
  }
  true;
}

download  show line numbers  debug dex   

Travelled to 3 computer(s): cfunsshuasjs, mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1013630
Snippet name: possiblyIsEvenIndent - is text indented with even spaces?
Eternal ID of this version: #1013630/4
Text MD5: 2cf71807f322a3872867e45bbe25c04f
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-12 09:51:31
Source code size: 179 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 43 / 40
Version history: 3 change(s)
Referenced in: [show]