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.

1  
sbool charArrayRegionMatches(char[] a, int aFrom, char[] b, int bFrom, int n) {
2  
  if (aFrom < 0 || bFrom < 0) false;
3  
  if (aFrom+n > l(a)) false;
4  
  if (bFrom+n > l(b)) false;
5  
  for i to n:
6  
    if (a[aFrom+i] != b[bFrom+i])
7  
      false;
8  
  true;
9  
}

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: 202 / 309
Version history: 3 change(s)
Referenced in: [show references]