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

8
LINES

< > BotCompany Repo | #1021306 // n2_generic - takes a string

JavaX fragment (include)

sS n2_generic(S n, S singular) {
  ret n2_generic(n, singular, singular + "s");
}

sS n2_generic(S n, S singular, S plural) {
  if (!isInteger(n)) ret n + " " + plural;
  ret n2(parseInt(n), singular, plural);
}

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: #1021306
Snippet name: n2_generic - takes a string
Eternal ID of this version: #1021306/2
Text MD5: 3eef2cac4bcb10cbf2345e1cfbf64a26
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-08 13:46:21
Source code size: 218 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 283 / 313
Version history: 1 change(s)
Referenced in: [show references]