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

10
LINES

< > BotCompany Repo | #1022238 // ai_mergePunctuation

JavaX fragment (include)

1  
sS ai_mergePunctuation(S a, S b) {
2  
  a = unnull(a);
3  
  b = unnull(b);
4  
  if (eq(a, b)) ret a;
5  
  if (empty(a)) ret b;
6  
  if (empty(b)) ret a;
7  
  if (isSpaces(a)) ret b;
8  
  if (isSpaces(b)) ret a;
9  
  ret simpleSpaces(a + b);
10  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1022238
Snippet name: ai_mergePunctuation
Eternal ID of this version: #1022238/4
Text MD5: 602bf15a8b7f1d8d373ab7c875ded007
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-11 15:46:09
Source code size: 227 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 250 / 298
Version history: 3 change(s)
Referenced in: [show references]