📄 pfil_parse_3.cc
字号:
// file: param_parse_3.cc// // isip include files//#include "param_file.h"#include "param_file_constants.h"// system include files//#include <string.h>// method: full_strip_cc//// arguments:// char_1* buffer: (input/output) parameter file text// char_1* chars: (input) characters to remove//// return: a logical_1 indicating status//// this method removes all instances of chars from the buffer//logical_1 Param_file::full_strip_cc(char_1* buffer_a, char_1* chars_a) { if ((buffer_a == (char_1*)NULL) || (chars_a == (char_1*)NULL)) { error_handler_cc((char_1*)"full_strip_cc", (char_1*) "the string to strip is NULL"); } char_1* buff_p; char_1* fixed_buff_p; // buff_p: the pointer to the original buffer that is read from // fixed_buff_p: the pointer that is writen to. // // note: we can both read at buff_p and write at fixed_buff_p // since buff_p >= fixed_buff_p and we always read before // we write // buff_p = buffer_a; fixed_buff_p = buffer_a; // while ( ((int_4)buff_p - (int_4)buffer_a) < in_len_a) { while (*buff_p != (char_1)NULL) { // branch on input // if (strchr((char*)chars_a, (char)*buff_p) == (char*)NULL) { *fixed_buff_p = *buff_p; fixed_buff_p++; } buff_p++; } *fixed_buff_p = (char_1)NULL; // exit gracefully // return ISIP_TRUE;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -