will not compile int colonPosition = reportString.indexOf(':');

and taken directly from the reference on this website.

this is the rest. I'm having a lot of time consuming issues with char and String.

A string has 23.98 or could have 123.49 I want to just have the 23 or 123

I don't want the period I can lop off the decimals by sub stringing the 123 but that leaves 23.98 looking like 23. and that wastes a space. I tried isnan but that doesn't work on strings apparently.

String reportString = "SensorReading: 456";
int colonPosition = reportString.indexOf(':');
reportString.setCharAt(colonPosition, '=');

compiler doesn't recognize &period either.

You cannot use the terms string and String interchangeably. They are entirely different things.

A string has 23.98 or could have 123.49 I want to just have the 23 or 123

String number = "125.67";

void setup()
{
   Serial.begin(115200);
   int intNumber = number.toInt();
   Serial.println(intNumber);
}

void loop()
{

}

That's HTML encoding gone wrong. See HTML Entities.

Solution: replace them with the correct character (' = apostrophe):

reportString.indexOf(':');

Pieter

This "'" issue in the documentation has already been fixed in the source, and is pending deployment to arduino.cc, so it should be gone soon.

Solution: replace them with the correct character (' = apostrophe):

good catch, there were two pieces of example in the reference, I was playing with both and they got run together some how. these are what I meant to copy.

String reportString = "SensorReading: 456";
int colonPosition = reportString.indexOf(':');
reportString.setCharAt(colonPosition, '=');

String reportString = "Franklin, Benjamin";
int spacePosition = reportString.indexOf(' ');
if (reportString.charAt(spacePosition + 1) == 'B') {
Serial.println("You might have found the Benjamins.")
}

pert:
This "'" issue in the documentation has already been fixed in the source, and is pending deployment to arduino.cc, so it should be gone soon.

The fix for this issue in the documentation has now been deployed.

you sure did, good job!