按照用户指定版面规格重新排版,实现页面调整、分段、分页等文本处理功能,排版结果输出文本文件中。
ADT String {
数据对象:D={ai | ai∈CharacterSet, i=1,2,...,n, n≥0}
数据关系:R1={ <ai-1 , ai> | , ai-1,ai∈D, i=2,...,n }
基本操作:
StrAssign (&T, chars)
初始条件:chars 是串常量。
操作结果:赋于串T的值为 chars。
StrCopy (&T, S)
初始条件:串 S 存在
操作结果:由串 S 复制得串 T。
DestroyString (&S)
初始条件:串 S 存在。
操作结果:串 S 被销毁。
StrEmpty (S)
初始条件:串 S 存在。
操作结果:若 S 为空串,则返回 TRUE,否则返回 FALSE。
StrCompare(S, T)
初始条件:串 S 和 T 存在。
操作结果:若S>T,则返回值=0;若S=T,则返回值<0;若S<T,则返回值<0。
StrLength (S)
初始条件:串 S 存在。
操作结果:返回串 S 序列中的字符个数,即串的长度。
ClearString (&S)
初始条件:串 S 存在。
操作结果:将 S 清为空串。
Concat(&T, S1, S2)
初始条件:串 S1 和 S2 存在。
操作结果:用 T 返回由 S1 和 S2 联接而成的新串。
SubString(&Sub, S, pos, len)
初始条件:串S存在,1≤pos≤StrLength(S)且0≤len≤StrLength(S)-pos+1。
操作结果:用 Sub 返回串S的第 pos 个字符起长度为 len 的子串。
Index (S, T,pos)
初始条件:串S和T存在,T 是非空串,1≤pos≤StrLength(S)。
操作结果:若主串S中存在和串T值相同的子串,则返回它在主串S中第pos个字符之后第一次出现的位置;否则函数值为0。
Replace(&S, T, V)
初始条件:串 S,T 和 V 存在,T 是非空串。
操作结果:用V替换主串S中出现的所有与T相等的不重叠的子串。
StrInsert(&S, pos, T)
初始条件:串 S 和 T 存在,1≤pos≤StrLength(S)+1。
操作结果:在串 S 的第 pos 个字符之前插入串 T。
StrDelete (&S, pos, len)
初始条件:串 S 存在,1≤pos≤StrLength(S)-len+1。
操作结果:从串 S 中删除第 pos 个字符起长度为 len 的子串。
} ADT String
1)主程序模块
int main()
{
初始化;
接受命令;
处理命令;}
2)文本处理模块—读取文本中的字符并处理
3)缩进、空格生成模块
int PageLength=55;
int PageWedth=60;
int LeftMargin=10;
int HeadingLength=5;
int FootingLength=5;
int StartingPageNumber=1;
void makespace(FILE *fs,int spacenum);
//生成空格
void makeheading(FILE *fs,int line,int& linenum);
//生成页眉
void makefooting(FILE *fs,int line,int& linenum,int &pagenum);
//生成页脚和页码
Status ReadText(char* readfilename,char* savefilename);
//文本读取函数
3)完整代码:
/*头文件*/
#include
#include
#include
#include
#include
using namespace std;
typedef int Status;
/*宏定义*/
#define OK 1
#define TRUE 1
#define ERROR 0
#define FALSE -1
#define MaxWordSize 50
/*默认参数*/
int PageLength=55;
int PageWedth=60;
int LeftMargin=10;
int HeadingLength=5;
int FootingLength=5;
int StartingPageNumber=1;
/*函数声明*/
void makespace(FILE *fs,int spacenum);
void makeheading(FILE *fs,int line,int& linenum);
void makefooting(FILE *fs,int line,int& linenum,int &pagenum);
Status ReadText(char* readfilename,char* savefilename);
void printOut();
int main()
{
cout<<"-------------------------欢迎使用文本编辑器----------------------------------"<<endl;
printOut();
cout<<"是否需要修改参数?(Y/N)"<<endl;
char judge;
cin>>judge;
int choice;
if(judge=='Y')
{
while(1)
{
cout<<"需要修改哪项"<<endl;
printf("1.页长:\n");
printf("2.页宽:\n");
printf("3.左空白:\n");
printf("4.头长:\n");
printf("5.脚长:\n");
printf("6.起始页号:\n");
printf("7.返回:\n");
cin>>choice;
if(choice==7) break;
switch(choice)
{
case 1:
printf("1.页长:\n");
cin>>PageLength;
break;
case 2:
printf("2.页宽:\n");
cin>>PageWedth;
break;
case 3:
printf("3.左空白:\n");
cin>>LeftMargin;
break;
case 4:
printf("4.头长:\n");
cin>>HeadingLength;
break;
case 5:
printf("5.脚长:\n");
cin>>FootingLength;
break;
case 6:
printf("6.起始页号:\n");
cin>>StartingPageNumber;
break;
default:
cout<<"输入错误"<<endl;
}
}
}
fflush(stdin);
cout<<"按任意键开始对指定文件格式化"<<endl;
getchar();
char *readfilename,*savefilename;
readfilename=new char[MaxWordSize];
savefilename=new char[MaxWordSize];
strcpy(readfilename,"待格式化文本.txt");
strcpy(savefilename,"已格式化文件.txt");
ReadText(readfilename,savefilename);
}
void printOut() //输出头文件中的所有整形变量
{
//这个函数中的参数全部来自头文件
printf("\n");
printf("版面的参数如下:\n");
printf("页长:%d\n",PageLength);
printf("页宽:%d\n",PageWedth);
printf("左空白:%d\n",LeftMargin);
printf("头长:%d\n",HeadingLength);
printf("脚长:%d\n",FootingLength);
printf("起始页号:%d\n",StartingPageNumber);
printf("\n");
printf("本程序只支持英文格式化\n");
printf("\n");
}
Status ReadText(char* readfilename,char* savefilename)
{
FILE *fp,*fs;
int wordnum=0;
int linenum=1;
int pagenum=StartingPageNumber;
char temp[MaxWordSize];
char prev[MaxWordSize];
if(((fp=fopen(readfilename,"r"))==NULL)||((fs=fopen(savefilename,"w+"))==NULL))
{
cout<<"打开文件失败"<<endl;
return ERROR;
}
makeheading(fs,HeadingLength,linenum);
makespace(fs,8);
makespace(fs,LeftMargin);
while(fscanf(fp,"%s",temp)!=EOF)
{
if(strcmp(temp,"@")==0)
{
printf("\n");
fprintf(fs,"\n");
linenum++;
makespace(fs,8);
makespace(fs,LeftMargin);
wordnum=0;
strcpy(prev,temp);
continue;
}
wordnum+=strlen(temp);
if(wordnum>PageWedth)
{
printf("\n");
fprintf(fs,"\n");
wordnum=0;
makespace(fs,LeftMargin);
linenum++;
}
if(linenum+FootingLength==PageLength)
{
makefooting(fs,FootingLength,linenum,pagenum);
makeheading(fs,HeadingLength,linenum);
linenum=0;
makespace(fs,LeftMargin);
wordnum=0;
if(strcmp(prev,"@")==0)
{
makespace(fs,8);
strcpy(prev,"#");
}
}
printf("%s ",temp);
fprintf(fs,"%s ",temp);
strcpy(prev,temp);
}
printf("\n");
fprintf(fs,"\n");
if(FootingLength>=3)
{
makefooting(fs,FootingLength,linenum, pagenum);
}
fclose(fp);
fclose(fs);
}
void makespace(FILE *fs,int spacenum)
{
char space=' ';
for(int i=0;i<spacenum;i++)
{
printf("%c",space);
fprintf(fs,"%c",space);
}
}
void makeheading(FILE *fs,int line,int &linenum)
{
for(int i=0;i<line;i++)
{
printf("\n");
fprintf(fs,"\n");
linenum++;
}
}
void makefooting(FILE *fs,int line,int &linenum,int &pagenum)
{
for(int i=0;i<line;i++)
{
if(i==1&&line>=3)
{
makespace(fs,8+LeftMargin+PageWedth/2);
printf("%d\n",pagenum);
fprintf(fs,"\t%d\n",pagenum);
continue;
}
printf("\n");
fprintf(fs,"\n");
linenum++;
}
pagenum++;
}
-------------------------欢迎使用文本编辑器----------------
版面的参数如下:
页长:55
页宽:60
左空白:10
头长:5
脚长:5
起始页号:1
本程序只支持英文格式化
是否需要修改参数?(Y/N)
2.完成选择或修改后,按任意键,即可开始格式化。格式化的结果会输出在屏幕上,同时会保存到文件“已格式化文件.txt”中。
在“待格式化文本.txt”中,有以下内容:
I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.I say to you today, my friends, that in spite of the difficulties and frustrations of the moment, I still have a dream. It is a dream deeply rooted in the American dream. @ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident: that all men are created equal." @ I have a dream that one day on the red hills of Georgia the sons of former slaves and the sons of former slaveowners will be able to sit down together at a table of brotherhood. @ I have a dream that one day even the state of Mississippi, a desert state, sweltering with the heat of injustice and oppression, will be transformed into an oasis of freedom and justice. @ I have a dream that my four children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. @ I have a dream today.
经过处理后,输出一下结果:
I say to you today, my friends, that in spite of the difficulties and
frustrations of the moment, I still have a dream. It is a dream deeply rooted in the
American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
1
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
2
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
3
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
4
character.
I have a dream today.I say to you today, my friends, that in spite of the
difficulties and frustrations of the moment, I still have a dream. It is a dream deeply
rooted in the American dream.
I have a dream that one day this nation will rise up and live out the true
meaning of its creed: "We hold these truths to be self-evident: that all men are
created equal."
I have a dream that one day on the red hills of Georgia the sons of former
slaves and the sons of former slaveowners will be able to sit down together at a
table of brotherhood.
I have a dream that one day even the state of Mississippi, a desert state,
sweltering with the heat of injustice and oppression, will be transformed into an
oasis of freedom and justice.
I have a dream that my four children will one day live in a nation where
they will not be judged by the color of their skin but by the content of their
character.
I have a dream today.
5