Length of Strings

Definition

The length of string s, denoted by |s|, is the number of letters in the string.

 

Example

Σ={a,b}

s=ababa

|s|=5

 

Example

Σ= {B, aB, bab, d}

s=BaBbabBd

Tokenizing=(B), (aB), (bab), (B), (d)

|s|=5

 

 

 

 

Previous

 

 

TOC

 

 

Next