Skip to content

Instantly share code, notes, and snippets.

@Cvetomird91
Created February 2, 2018 06:45
Show Gist options
  • Save Cvetomird91/3aedc2771d9a67cb61318ec2e4c4483b to your computer and use it in GitHub Desktop.
Save Cvetomird91/3aedc2771d9a67cb61318ec2e4c4483b to your computer and use it in GitHub Desktop.
#include<iostream>
#include<string>
#include<sstream>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main() {
const char* name = "Exec";
const char* utfd = u8"utf-8!!!";
char init[] = {'a', 'b', 'c', 'd', '\0'};
init[0] = 'x';
const wchar_t* name2 = L"Exec!!!";
const char16_t* name3 = u"Exec";
const char32_t* name4 = U"Exec";
const char* no_escape_characters = R"(\\n\t)";
const char* new_lines = "Line1"
"Line2"
"Line3";
std::string exec(name);
bool contains = exec.find("Ex") != std::string::npos;
std::cout << contains << std::endl;
std::cout << strlen(name) << std::endl;
std::cout << init[0] << std::endl;
std::cout << new_lines << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment