Implement file:
#include "stdafx.h"
#include
#include "Wordlib.h" #include "_string.h"
Namespace wordlib {
Typedef st :: basic_string
Static const char * __STRWORDLIB [] = {"***", "***", "**** you", "script"}
Static __wordlist __wordlist;
Static __string __nullstr = "";
Void __initwordlist () {if (__ wordlist.size ()! = 0) Return;
For (size_t i = 0; i Std :: sort (__ WordList.begin (), __wordlist.end ()); BOOL _FLYINGMAGIC_2_CUT_WORD IsValid (const char * str) {__ initword (); if (str! = null) {__ string strsrc (STR); __Wordlist :: item ity = __WordList.end (); For (__ wordlist :: item.begin (); it! = ity; {i (strsrc.find (* it)! = -1) Return False;}} Return True;} BOOL _FLYINGMAGIC_2_CUT_WORD FILTRATE (CHAR * DST, SIZE_T LEN, Const Char * src) {__ initwordlist (); BOOL BRET = FALSE; IF (src! = null && dst! = null && strlen (src) <= len) {__ String STRSRC (SRC) __Wordlist :: item ity = __WordList.end (); For (__ wordlist :: item (); it! = ipnd; {__ string :: size_type beginning = strsrc.find (* it); if (begin! = -1) {for (__ string :: size_type t = 0; t Bret = True;}} STRCPY (DST, strsrc.c_str ());