Node.js buffer includes() Method - W3Schools

文章推薦指數: 80 %
投票人數:10人

Definition and Usage. The includes() method checks if a specified value is included in the buffer. Returns true if the values is included, otherwise false. Tutorials References Exercises Videos Menu Login FreeWebsite GetCertified Pro HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP BOOTSTRAP HOWTO W3.CSS C C++ C# REACT R JQUERY DJANGO TYPESCRIPT NODEJS MYSQL    Darkmode Darkcode × Tutorials HTMLandCSS LearnHTML LearnCSS LearnRWD LearnBootstrap LearnW3.CSS LearnColors LearnIcons LearnGraphics LearnSVG LearnCanvas LearnHowTo LearnSass DataAnalytics LearnAI LearnMachineLearning LearnDataScience LearnNumPy LearnPandas LearnSciPy LearnMatplotlib LearnStatistics LearnExcel XMLTutorials LearnXML LearnXMLAJAX LearnXMLDOM LearnXMLDTD LearnXMLSchema LearnXSLT LearnXPath LearnXQuery JavaScript LearnJavaScript LearnjQuery LearnReact LearnAngularJS LearnJSON LearnAJAX LearnAppML LearnW3.JS Programming LearnPython LearnJava LearnC LearnC++ LearnC# LearnR LearnKotlin LearnGo LearnDjango LearnTypeScript ServerSide LearnSQL LearnMySQL LearnPHP LearnASP LearnNode.js LearnRaspberryPi LearnGit LearnMongoDB LearnAWSCloud WebBuilding CreateaWebsiteNEW WhereToStart WebTemplates WebStatistics WebCertificates WebDevelopment CodeEditor TestYourTypingSpeed PlayaCodeGame CyberSecurity Accessibility Blog DataAnalytics LearnAI LearnMachineLearning LearnDataScience LearnNumPy LearnPandas LearnSciPy LearnMatplotlib LearnStatistics LearnExcel LearnGoogleSheets XMLTutorials LearnXML LearnXMLAJAX LearnXMLDOM LearnXMLDTD LearnXMLSchema LearnXSLT LearnXPath LearnXQuery × References HTML HTMLTagReference HTMLBrowserSupport HTMLEventReference HTMLColorReference HTMLAttributeReference HTMLCanvasReference HTMLSVGReference GoogleMapsReference CSS CSSReference CSSBrowserSupport CSSSelectorReference Bootstrap3Reference Bootstrap4Reference W3.CSSReference IconReference SassReference JavaScript JavaScriptReference HTMLDOMReference jQueryReference AngularJSReference AppMLReference W3.JSReference Programming PythonReference JavaReference ServerSide SQLReference MySQLReference PHPReference ASPReference XML XMLDOMReference XMLHttpReference XSLTReference XMLSchemaReference CharacterSets HTMLCharacterSets HTMLASCII HTMLANSI HTMLWindows-1252 HTMLISO-8859-1 HTMLSymbols HTMLUTF-8 × ExercisesandQuizzes Exercises HTMLExercises CSSExercises JavaScriptExercises PythonExercises SQLExercises PHPExercises JavaExercises CExercises C++Exercises C#Exercises jQueryExercises React.jsExercises MySQLExercises Bootstrap5Exercises Bootstrap4Exercises Bootstrap3Exercises NumPyExercises PandasExercises SciPyExercises TypeScriptExercises ExcelExercises RExercises GitExercises KotlinExercises GoExercises MongoDBExercises Quizzes HTMLQuiz CSSQuiz JavaScriptQuiz PythonQuiz SQLQuiz PHPQuiz JavaQuiz CQuiz C++Quiz C#Quiz jQueryQuiz React.jsQuiz MySQLQuiz Bootstrap5Quiz Bootstrap4Quiz Bootstrap3Quiz NumPyQuiz PandasQuiz SciPyQuiz TypeScriptQuiz XMLQuiz RQuiz GitQuiz KotlinQuiz CyberSecurityQuiz AccessibilityQuiz Courses HTMLCourse CSSCourse JavaScriptCourse FrontEndCourse PythonCourse SQLCourse PHPCourse JavaCourse C++Course C#Course jQueryCourse React.jsCourse Bootstrap4Course Bootstrap3Course NumPyCourse PandasCourse TypeScriptCourse XMLCourse RCourse DataAnalyticsCourse CyberSecurityCourse AccessibilityCourse Certificates HTMLCertificate CSSCertificate JavaScriptCertificate FrontEndCertificate PythonCertificate SQLCertificate PHPCertificate JavaCertificate C++Certificate C#Certificate jQueryCertificate React.jsCertificate MySQLCertificate Bootstrap5Certificate Bootstrap4Certificate Bootstrap3Certificate TypeScriptCertificate XMLCertificate ExcelCertificate DataScienceCertificate CyberSecurityCertificate AccessibilityCertificate × Tutorials References Exercises GetCertified Spaces Videos Shop Pro Node.jsTutorial Node.jsHOME Node.jsIntro Node.jsGetStarted Node.jsModules Node.jsHTTPModule Node.jsFileSystem Node.jsURLModule Node.jsNPM Node.jsEvents Node.jsUploadFiles Node.jsEmail Node.jsMySQL MySQLGetStarted MySQLCreateDatabase MySQLCreateTable MySQLInsertInto MySQLSelectFrom MySQLWhere MySQLOrderBy MySQLDelete MySQLDropTable MySQLUpdate MySQLLimit MySQLJoin Node.jsMongoDB MongoDBGetStarted MongoDBCreateDatabase MongoDBCreateCollection MongoDBInsert MongoDBFind MongoDBQuery MongoDBSort MongoDBDelete MongoDBDropCollection MongoDBUpdate MongoDBLimit MongoDBJoin RaspberryPi RasPiGetStarted RasPiGPIOIntroduction RasPiBlinkingLED RasPiLED&Pushbutton RasPiFlowingLEDs RasPiWebSocket RasPiRGBLEDWebSocket RasPiComponents Node.jsReference Built-inModules Node.jsbufferincludes()Method ❮BufferModule Example Checkifabufferincudesthephrase"welcome": varbuf=Buffer.from('Hello,andwelcometoRome!');console.log(buf.includes('welcome')); Runexample» DefinitionandUsage Theincludes()methodchecksifaspecifiedvalueisincludedinthebuffer. Returnstrueifthevaluesisincluded,otherwisefalse. Syntax buffer.includes(value,start,encoding); ParameterValues Parameter Description value Required.Whattosearchfor.Legalvaluetypes:String BufferNumber(Integer) start Optional.Wheretobeginthesearch.Default0 encoding Optional.Ifthevalueisastring,thisparameterisusedtospecifyitsencoding.Default"utf8" TechnicalDetails ReturnValue: ABoolean Node.jsVersion: 5.3.0 ❮BufferModule NEW WejustlaunchedW3Schoolsvideos Explorenow COLORPICKER Getcertifiedbycompletingacoursetoday! w3schoolsCERTIFIED.2022 Getstarted CODEGAME PlayGame



請為這篇文章評分?