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

5
LINES

< > BotCompany Repo | #1032378 // isYouTubeURL

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

Libraryless. Click here for Pure Java version (3410L/19K).

1  
sbool isYouTubeURL(S s) false on exception {
2  
  s = addDefaultProtocolToURL("https", s);
3  
  S host = hostNameFromURL(s);
4  
  ret domainIsUnderOneOf(host, "youtu.be", "youtube.com");
5  
}

Author comment

Began life as a copy of #1009199

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1032378
Snippet name: isYouTubeURL
Eternal ID of this version: #1032378/2
Text MD5: 17c75983d5a57d3e2a176eff1bc239cd
Transpilation MD5: fef597ee5103ac020b5e07cea423627b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-02 02:52:15
Source code size: 183 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 144 / 201
Version history: 1 change(s)
Referenced in: [show references]