tools: acrn-crashlog: string utils for acrn-crashlog

This file provides some string operations for acrn-crashlog.

Signed-off-by: Liu Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com>
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
Liu Xinwu
2018-04-25 14:57:01 +08:00
committed by lijinxia
parent 6f9dfa49bf
commit 780fefcc20
3 changed files with 127 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
/*
* Copyright (C) 2018 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __STRUTILS_H__
#define __STRUTILS_H__
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
int strlinelen(char *str);
char *strrstr(char *s, char *str);
char *next_line(char *buf);
char *strtrim(char *str);
int strcnt(char *str, char c);
#endif