[Question]
  [
Given a string, return whether the string is a substring of the program's source code.
Standard quine rules apply, meaning you cannot read your own source code. The length of the input is guaranteed to be less than or equal to the length of the program. You may return any two distinct values, not necessarily truthy and falsey values. You may also submit a function, rather than a full program.
This is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so shortest code wins!
### An example
If your source code is `print(input() = False)`, it should return True for `nt(i` but False for `tupn`.
  
[Answer]
# [Python 2](https://docs.python.org/2/), 41 bytes
```
s="print input()in's=%r;exec s'%s";exec s
```
[Try it online!](https://tio.run/##K6gsycjPM/r/v9hWqaAoM69EITOvoLREQzMzT73YVrXIOrUiNVmhWF21WAnK/P9fHaxQHQA "Python 2 ‚Äì Try It Online")
[Answer]
# [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript), 25 bytes
```
f=s=>('f='+f).includes(s)
```
[Try it online!](https://tio.run/##DcnBDYAwCADAcYAYuwHu0rRgakgxoq6P3veO@tZo1zjvdXqXTOXgDUEZFqUyZrOnS2BQNp/hJsV8R0X4C4jyAw "JavaScript (Node.js) ‚Äì Try It Online")
I'm personally not a fan of this, but [it's allowed](https://codegolf.meta.stackexchange.com/a/13638/68615).
## Alternate (invalid?) solution, 19 bytes
This takes input as a regex.
```
f=s=>s.test('f='+f)
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/f8/zbbY1q5YryS1uERDPc1WXTtN839yfl5xfk6qXk5@ukaahj5QTl9T8z8A "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# Java 8, ~~124~~ 112 bytes (function)
```
p->{String s="p->{String s=%c%s%1$c;return s.format(s,34,s).contains(p);}";return s.format(s,34,s).contains(p);}
```
[Try it here.](https://tio.run/##jY9Bi8IwEIXv/RVD2UIKGlj0VvQf6MXj4mFMo0TbSchMBZH@9my624sLC14GHvNm3veueMelD5au7S2ZDplhh46eBYAjsfGMxsJ@kgAn7zuLBEYdJDq6QKibvBiLPFhQnIE9EGwgheX2OXt4U76oylRcfX6YJloZIgHrs489iuLFar3gWhtPkglY5e9j@Z4tNRNDGE5dZphR7t610GfLTPt1BKx/ixweLLbXfhAd8ko6UqSNKv8GlfVPwf8PIlLr@5w4BczusRhT@gY)
---
Here is it as full program instead (to see one of the reasons why functions are allowed on PPCG, because some languages -like Java- require very verbose mandatory boilerplate code for full programs).
# Java 8, ~~226~~ 214 bytes (full program)
```
interface M{static void main(String[]a){String s="interface M{static void main(String[]a){String s=%c%s%1$c;System.out.print(s.format(s,34,s).contains(a[0]));}}";System.out.print(s.format(s,34,s).contains(a[0]));}}
```
[Try it here.](https://tio.run/##ncxBCsIwEIXhq4RiIIEaFN0Vj9BVl6WLIU0llUxKZixI6dljQHCvux8e35thhWNcHM7jI2eP7NIE1ol2Iwb2VqzRjyKAR9Vx8njvB9DbJwXdqp@FtJLk@WCb7kXsgolPNkvZWJGZYgpQor5ca9LGRuRyQwr606B1s@/VXyrn/CVv)
---
**Explanation:**
* The `String s` contains the unformatted source code.
* `%s` is used to input this String into itself with the `s.format(...)`.
* `%c`, `%1$c` and the `34` are used to format the double-quotes.
* `s.format(s,34,s)` puts it all together.
And then `.contains(...)` is used to check if this source code contains the given input.
[Answer]
# [Haskell](https://www.haskell.org/), 92 bytes
```
import Data.List;f s=isInfixOf s$(++)<*>show$"import Data.List;f s=isInfixOf s$(++)<*>show$"
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/PzO3IL@oRMElsSRRzyezuMQ6TaHYNrPYMy8ts8IfyFbR0NbWtNGyK87IL1dRIk31/9zEzDwFW4XMvJLUosTkEgUVBZCEgp5C2n@irQAA "Haskell ‚Äì Try It Online") Obvious extension of the standard quine. Getting rid of the import would be nice, but I doubt `isInfixOf` can be computed in a shorter amount of bytes.
[Answer]
## [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 33 bytes
```
!StringFreeQ[ToString[#0], #1] & 
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n6Zg@18xuKQoMy/drSg1NTA6JB/Ci1Y2iNVRUDaMVVBT@B8AFClxSItWIqhUKfY/AA "Wolfram Language (Mathematica) ‚Äì Try It Online")
[Answer]
# Bash, ~~43~~, 28 bytes
```
[[ $BASH_COMMAND = *"$1"* ]]
```
[try it online](https://tio.run/##S0oszvifll@kUKyQmafg5BisoB4draACZHjEO/v7@jr6uSjYKmgpqRgqaSnExqrjl1ZQt1ZIyVcoTi1R0NVVUFIpVvqPT/n/1OSMfAUldRVDdSsFFQ0NRRV7TU0lrpT8vNT/AA)
[Answer]
# [QBIC](https://drive.google.com/drive/folders/0B0R1Jgqp8Gg4cVJCZkRkdEthZDQ), 28 bytes
```
?instr(B+B,;)#?instr(B+B,;)#
```
This prints 0 if the input is not a substring of the source, and X otherwise where X is the (first) index of the substring.
## Explanation
```
Latter part:
#?instr(B+B,;)#   Define a string literal B$ with a copy of the source
First part:
?                 PRINT
 instr(   , )     the index of
           ;          the cmd line parameter A$
       B+B            in B$ concatenated with itself
```
`#` defines a string literal in QBIC, and assigns it to the first available string variable. That is `B$` in this program, because `A$` is already taken by `;` (read a string from cmd line). Then, everything up to the delimiter is fed into the literal; the delimiter is a backtick - which also makes it the only ASCII char not includable in string lits. In this case, QBIC doesn't need a backtick, because the literal is terminated at the end of the code by QBIC's auto-close feature. For more information on QBIC's literals, see [the Showcase thread](https://codegolf.stackexchange.com/questions/44680/showcase-of-languages/86385#86385).
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 10 bytes
```
‚Äú;‚Åæv·πæ∆ì·∫á‚Äùv·πæ
```
[Try it online!](https://tio.run/##y0rNyan8//9RwxzrR437yh7u3Hds8sNd7Y8a5oLY//@rQznqAA "Jelly ‚Äì Try It Online")
### How it works
```
‚Äú;‚Åæv·πæ∆ì·∫á‚Äùv·πæ  Main link. No arguments.
‚Äú;‚Åæv·πæ∆ì·∫á‚Äù    Set the left argument and the return value to ';‚Åæv·πæ∆ì·∫á'.
         ·πæ  Uneval; yield '‚Äú;‚Åæv·πæ∆ì·∫á‚Äù'.
        v   Dyadic eval; eval ';‚Åæv·πæ∆ì·∫á' with argument '‚Äú;‚Åæv·πæ∆ì·∫á‚Äù'.
  ‚Åæv·πæ       Yield 'v·πæ'.
 ;          Append it to '‚Äú;‚Åæv·πæ∆ì·∫á‚Äù', yielding the source code.
     ∆ì      Read a string from STDIN.
      ·∫á     Check if it's a substring of the source code.
```
[Answer]
# Julia, 72 bytes
I now understand what people mean when they say that quine problems are just variations on the classic quine. 
```
x="~y=contains\"x=\$(repr(x));\$x\",y)";~y=contains("x=$(repr(x));$x",y)
```
## Explanation
```
#Defines x to be the next line of the source, with the help of escaping characters
x="~y=contains\"x=\$(repr(x));\$x\",y)"; 
#Interpolates together a comparison string, including repr(x), the re-escaped from of x, and x itself, for comparison. 
~y=contains("x=$(repr(x));$x",y)
```
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `D`, 56 [bitsv2](https://github.com/Vyxal/Vyncode/blob/main/README.md), 7 bytes
```
`I«éc`I«éc
```
[Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyJEPSIsIiIsImBJx45jYEnHjmMiLCIiLCJJx45jIl0=)
## Explained
```
`I«éc`I«éc¬≠‚Å°‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å£‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å°‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å§‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å°‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å£‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å¢‚Å™‚Äè‚Å†‚Å™‚Å™‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å§‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å§‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå¬≠
      «é   # ‚Äé‚Å°Does all substrings of 
`I«éc`     # ‚Äé‚Å¢  The string "I«éc"
     I    # ‚Äé‚Å£  With a version surrounded in backticks prepended to itself
       c  # ‚Äé‚Å§Contain the input?
üíé
```
Created with the help of [Luminespire](https://vyxal.github.io/Luminespire).
[Answer]
# Perl 5, 60 + 2 (-pl) bytes
```
$_=(sprintf$a=q($_=(sprintf$a=q(%s),$a)=~/\Q$_/),$a)=~/\Q$_/
```
[try it online](https://tio.run/##K0gtyjH9/18l3lajuKAoM68kTSXRtlADna9arKmjkqhpW6cfE6gSr4/CIaybC7dmLkpsJqhZQQG35n/5BSWZ@XnF/3ULcgA)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 17 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
0"D34√ß√ΩI√•"D34√ß√ΩI√•
```
Modification of the default [quine](/questions/tagged/quine "show questions tagged 'quine'") [`0"D34√ß√Ω"D34√ß√Ω`](https://codegolf.stackexchange.com/a/97899/52210) by adding `I√•`.
[Try it online.](https://tio.run/##yy9OTMpM/f/fQMnF2OTw8sN7PQ8vRWL@/w/mAwA)
**Explanation:**
```
0                    # Push 0 to the stack
                     #  STACK: [0]
 "D34√ß√ΩI√•"           # Push the string 'D34√ß√ΩI√•' to the stack
                     #  STACK: [0, 'D34√ß√ΩI√•']
          D          # Duplicate this string
                     #  STACK: [0, 'D34√ß√ΩI√•', 'D34√ß√ΩI√•']
           34√ß       # Push '"' to the stack
                     #  STACK: [0, 'D34√ß√ΩI√•', 'D34√ß√ΩI√•', '"']
              √Ω      # Join the stack by this '"' delimiter
                     #  STACK: ['0"D34√ß√ΩI√•"D34√ß√ΩI√•']
               I     # Take the input
                     #  STACK: ['0"D34√ß√ΩI√•"D34√ß√ΩI√•', 'I√•"D']
                √•    # Check if it's a substring of the source code
                     #  STACK [1]
                     # (Output the top of the stack implicitly)
```
]