say to oneself (独り言で言う): She said to herself, “I can do this.” (彼女は独り言で「私はこれができる」と言いました)

She said to herself, “I can do this.