string – POFTUT

Tagged: string

0

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 visiting poftut.com”  is a string which completely consists of the alphabet. “I visit poftut.com 2...

0

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.

const char* str1 is the first string or char array which will be compared the second one. const is mainly used to prevent given char array pointer to be changed. const char* str2...

0

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 return a pointer to the first occurrence.  We will also provide the string or char...

0

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

Java programming language provides different variable type. One of the most used types are 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() Function parseInt() is a function which can be used to convert string to int. parseInt() is...

0

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 example. We will look how to match exact string or file name with a absolute...

0

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 start by printing help information about printf . And as we will examine most of the...

0

Linux Grep OR, AND, NOT Operator and Logic Examples

logrep is very useful tool for text search and pattern matching. We have all ready provided tutorial and examples about grep and egrep . In this tutorial we will look grep command or , and , not logic operations in detail. Example Text We will use following text during tutorial for grep operations. This is the wage list of Manchester United Football Team.

OR Logic or logic matches all...

1

C – Printf Tutorial with Examples

C and C++ programming language a printf function which is used to print given values or data to the standard output or current terminal. printf supports different formatting types. In this tutorial we will look them in detail. Syntax Syntax of printf is like below.

Print printf function can be used simply just providing single variable. In this example we have a integer variable named age . We print this variable with %d which is...

0

Php – Operators

[rps-include post=6522] We have almost learned the variables and related types. But just variables do not enough to create useful applications. We generally need to operate over these variables and data. Operators are a way to operate on variable and data. For example if we need to sum two integer variables we should use sum operator. Let’s start looking available operators. We groups operators with the following group names. Arithmetic...

0

Php – String Variable Type

[rps-include post=6522] Php have variable type string to store text,char or string values. String type generally used to store values like name, surname, explanations, address, questions. String variables do not have any size or length limit theoretically. The only limit is the system memory limit. String can be defined in two ways like below. Single Quote Double Quote Single Quote Single quote string definition is very the same of double quote...

Enjoy this blog? Please spread the word :)