string – POFTUT

How To Substring In Python?

How To Substring In Python?

Python is a feature-rich programming language that provides a lot of string or text-related functions. String manipulation provides different operations where Substring operation is one of the most important. What Is Substring? Substring is an operation that will get some part of the specified string. Substring operations can be done in different ways and methods. … Read more

strlen() Function In C and C++ Tutorial with Examples

strlen() Function In C and C++ Tutorial with Examples

C and C++ programming languages provide the strlen() function in order to calculate or return the size of the given string or char array. String and char array is the same data type in C and C++ which simply a character array. strlen() function provided from the string.h header or library. strlen() Function Syntax strlen() … Read more

strstr() Function in C and C++ Tutorial with Examples

strstr() Function in C and C++ Tutorial with Examples

C and C++ programming languages provide the strstr() function in order to find or match a string in another string. For example, we can search pof string inside the poftut.com and find matches and return the matching index number. strstr() Function Syntax strstr() function has the following syntax where two strings are provided as parameter. … Read more

Java Data Types

Java Data Types

Java is a completely object-oriented programming language which provides a lot of different type of features. Primitive data types are some of them. Java provides basic or primitive data types like integer, string, logical true and false, etc. In this tutorial, we will learn the Java Primitive Datatypes. Primitive Data Types Most of the programming … Read more

What Is String Data Type In JavaScript, Java, Python, C# , PHP, C, C++, PowerShell Programming Languages?

String is a very popular data type which can be used in different programming languages like JavaScript, Java, Python, C#, PHP, C, C++, PowerShell.  String is mainly used to store characters like a text. Alternative data types are an integer, floating point, etc where they are mainly used for mathematical calculations. For example “I am … Read more

strcmp() C Library Function Usage with Examples

C programming standard library provides strcmp() function in order to compare two strings and return the results whether they are identical or different. Syntax and Parameters As stated previously strcmp() function takes two char array or string arguments. int strcmp (const char* str1, const char* str2); const char* str1 is the first string or char array which … Read more

strchr – Find Character In A String C and C++ Tutorial with Examples

C library provides a lot of functions in order to use string or char array types. strchr() function is a very popular function which is used to find the first occurrence of a given character in a string or char array. Syntax and Parameters As strchr() provides the first occurrence of the given char it will … Read more

How To Convert String To Int (Integer) In Java?

Java programming language provides different variable types. One of the most used types is String and Int or integer. During the usage of these variable types, we may need to convert them. In this tutorial, we will examine string to int and int to string variables types conversion in Java programming language. Convert with parseInt() … Read more

PHP Glob() Function To Match Path, Directory, File Names with Examples

glob is a general term used to define techniques to match specified pattern according to rules related Unix shell. Linux and Unix systems and shells also supports glob and also provide function glob() in system libraries. In this tutorial we will look glob() function usage in PHP programming language. Exact String Search We will start with a simple … Read more

Linux Bash Shell Printf Command Examples

Linux provides different commands to print given string or data into the terminla or specified place. printf is one of them which is similar to the C programming language printf()  function. Actually it is cloned from C printf function which provides similar features to write given string to the terminal in a structured manner. Help We will … Read more