Skip to content

Instantly share code, notes, and snippets.

View Thecarisma's full-sized avatar
👽

A Thecarisma

👽
View GitHub Profile
@Thecarisma
Thecarisma / playground.rs
Created December 15, 2019 21:47 — forked from rust-play/playground.rs
Code shared from the Rust Playground
pub fn reverse_string(s: &mut Vec<char>) {
if s.len() <= 1 {
return;
}
let mut i = 0;
let mut j = s.len() - 1;
while i != j && i < j {
s.swap(i, j);
i += 1;
j -= 1;
@Thecarisma
Thecarisma / ptarget.h
Created July 10, 2018 20:47 — forked from ByteProject/ptarget.h
header for compiler and OS detection (portable C)
/*
* ptarget.h
*
* Coded by Stefan Vogt, revised Feb 18, 2011.
* Released under the FreeBSD license.
* http://www.byteproject.net
*
* header for compiler and OS detection
*
*/