source: gaycko/trunk/src/helpers/str.c @ 4748

Last change on this file since 4748 was 4748, checked in by Jean-Yves Lamoureux, 10 years ago
  • Added copyright notices
File size: 774 bytes
Line 
1/*
2 *  Gaycko        Text mode web browser
3 *  Copyright (c) 2011 Jean-Yves Lamoureux <jylam@lnxscene.org>
4 *                All Rights Reserved
5 *
6 *  This library is free software. It comes without any warranty, to
7 *  the extent permitted by applicable law. You can redistribute it
8 *  and/or modify it under the terms of the Do What The Fuck You Want
9 *  To Public License, Version 2, as published by Sam Hocevar. See
10 *  http://sam.zoy.org/wtfpl/COPYING for more details.
11 */
12#include "str.h"
13#include <string.h>
14
15
16void strip_eol(char *str) {
17        int s = strlen(str)+1;
18    int i;
19   
20    for(i = 0; i < s; i++) {
21        if(str[i] == 10 ||
22           str[i] == 13) str[i] = ' ';
23    }
24   
25}
26
27void strip_spaces(char *str) {
28        int s = strlen(str)+1;
29   
30    (void)s;
31   
32
33}
Note: See TracBrowser for help on using the repository browser.