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

9
LINES

< > BotCompany Repo | #1029156 // charArrayRegionMatches

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (2476L) is out of date.

sbool charArrayRegionMatches(char[] a, int aFrom, char[] b, int bFrom, int n) {
  if (aFrom < 0 || bFrom < 0) false;
  if (aFrom+n > l(a)) false;
  if (bFrom+n > l(b)) false;
  for i to n:
    if (a[aFrom+i] != b[bFrom+i])
      false;
  true;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1029156
Snippet name: charArrayRegionMatches
Eternal ID of this version: #1029156/4
Text MD5: 3b014bf77f422f2f06cb2b8bf0bcd6b6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-24 14:01:05
Source code size: 253 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 201 / 307
Version history: 3 change(s)
Referenced in: [show references]