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

8
LINES

< > BotCompany Repo | #1002377 // a function - format "a kiwi" or "an orange" - also, make HTML link

JavaX fragment (include)

static S a(S noun) {
  if (eq(noun, "")) ret "?";
  ret ("aeiou".indexOf(noun.charAt(0)) >= 0 ? "an " : "a ") + noun;
}

static S a(S contents, O... params) {
  ret hfulltag("a", contents, params);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002377
Snippet name: a function - format "a kiwi" or "an orange" - also, make HTML link
Eternal ID of this version: #1002377/2
Text MD5: 3cdd4e1313b02ac74a566eb0adbbb721
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-25 02:20:20
Source code size: 208 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 691 / 907
Version history: 1 change(s)
Referenced in: [show references]