I want to find the number of characters inside a double quotation mark.
For example :
Case 1
\"Hello World\" , \"Some
output :
You could use something simple like finding the positions of the double quotes and subtracting them.
static const std::string example = "The \"comment\" is quoted.";
const std::string::size_type first_position = example.find('"');
const std::string::size_type second_position = example.find('"', second_position + 1);
const unsigned int character_quantity = second_position - first_position;
There are issues with the above code, such as checking if the double quotes exist, that the OP should implement.
This is one of many possible implementations.