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)

// ignores case
static class StartsWith extends Prolog.BaseNative {
  *() { super("$x starts with $y"); }
  
  boolean yo() {
    S x = unq("x"), y = unq("y");
    ret swic(x, y);
  }
}

// ignores case
static class EndsWith extends Prolog.BaseNative {
  *() { super("$x ends with $y"); }
  
  boolean yo() {
    S x = unq("x"), y = unq("y");
    ret endsWithIgnoreCase(x, y);
  }
}

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: 477 / 665
Referenced in: [show references]