Coder Social home page Coder Social logo

basemax / string2cstring Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 23 KB

A tiny program to convert a file contents to C string with supporting multi-lines...

License: GNU General Public License v3.0

PHP 14.14% C 85.86%
php c string string-formatter string-parse strings parser parsers c-string string-c

string2cstring's Introduction

Convert String to C String

A tiny program to convert a file contents to C string with supporting multi-lines...

Test

Output

printf("%s", "<header class=\"navbar container\">\n");
printf("%s", "\t<section class=\"navbar-section\" style=\"padding:15px;\">\n");
printf("%s", "\t\t<img src=\"logo.svg\">\n");
printf("%s", "\t\t<form>\n");
printf("%s", "\t\t\t<div class=\"has-icon-left float-right\" style=\"padding-right:20px;\">\n");
printf("%s", "\t\t\t\t<input type=\"text\" class=\"form-input\" style=\"border:0px;border-bottom:2px solid #5755d9;\" placeholder=\"title...\">\n");
printf("%s", "\t\t\t</div>\n");
printf("%s", "\t\t\t<button class=\"btn btn-action btn-sm float-left\" style=\"border:0px;margin-right:-35px;margin-top:6px;\"><i class=\"icon icon-search\" style=\"margin-top:3px;\"></i></button>\n");
printf("%s", "\t\t</form>\n");
printf("%s", "\t</section>\n");
printf("%s", "\t<section class=\"navbar-center\">\n");
printf("%s", "\t\t<ul class=\"tab\">\n");
printf("%s", "\t\t\t<li class=\"tab-item active\">\n");
printf("%s", "\t\t\t\t<a href=\"#\">title</a>\n");
printf("%s", "\t\t\t</li>\n");
printf("%s", "\t\t\t<li class=\"tab-item\">\n");
printf("%s", "\t\t\t\t<a href=\"#\">title</a>\n");
printf("%s", "\t\t\t</li>\n");
printf("%s", "\t\t\t<li class=\"tab-item\">\n");
printf("%s", "\t\t\t\t<a href=\"#\">title</a>\n");
printf("%s", "\t\t\t</li>\n");
printf("%s", "\t\t</ul>\n");
printf("%s", "\t</section>\n");
printf("%s", "\t<section class=\"navbar-section\">\n");
printf("%s", "\t\t<a href=\"#\" class=\"btn btn-link\">title</a>\n");
printf("%s", "\t\t<a href=\"#\" class=\"btn btn-link\">title</a>\n");
printf("%s", "\t</section>\n");
printf("%s", "</header>\n");

Input

<header class="navbar container">
	<section class="navbar-section" style="padding:15px;">
		<img src="logo.svg">
		<form>
			<div class="has-icon-left float-right" style="padding-right:20px;">
				<input type="text" class="form-input" style="border:0px;border-bottom:2px solid #5755d9;" placeholder="title...">
			</div>
			<button class="btn btn-action btn-sm float-left" style="border:0px;margin-right:-35px;margin-top:6px;"><i class="icon icon-search" style="margin-top:3px;"></i></button>
		</form>
	</section>
	<section class="navbar-center">
		<ul class="tab">
			<li class="tab-item active">
				<a href="#">title</a>
			</li>
			<li class="tab-item">
				<a href="#">title</a>
			</li>
			<li class="tab-item">
				<a href="#">title</a>
			</li>
		</ul>
	</section>
	<section class="navbar-section">
		<a href="#" class="btn btn-link">title</a>
		<a href="#" class="btn btn-link">title</a>
	</section>
</header>

string2cstring's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.