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

19
LINES

< > BotCompany Repo | #1005190 // Prolog Native Modules 2 (include)

JavaX fragment (include)

1  
// ignores case
2  
static class StartsWith extends Prolog.BaseNative {
3  
  *() { super("$x starts with $y"); }
4  
  
5  
  boolean yo() {
6  
    S x = unq("x"), y = unq("y");
7  
    ret swic(x, y);
8  
  }
9  
}
10  
11  
// ignores case
12  
static class EndsWith extends Prolog.BaseNative {
13  
  *() { super("$x ends with $y"); }
14  
  
15  
  boolean yo() {
16  
    S x = unq("x"), y = unq("y");
17  
    ret endsWithIgnoreCase(x, y);
18  
  }
19  
}

Author comment

Began life as a copy of #1002933

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: #1005190
Snippet name: Prolog Native Modules 2 (include)
Eternal ID of this version: #1005190/1
Text MD5: 7395aa35c551d3d0d1029652e8a7b084
Author: stefan
Category: eleu / nl
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-19 19:35:58
Source code size: 402 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 479 / 668
Referenced in: [show references]