如何将输入文本对齐到左侧? [英] How can i align the input text to the left?
本文介绍了如何将输入文本对齐到左侧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想编写一个程序,用于从用户输入文本并将其对齐到左侧。有没有可以使用的命令?我怎么想?
i want to write a program that input a text from user and align it to the left. Is there any command that i can use? How should i think?
推荐答案
你的意思是将它对齐到左边?
- 删除前导空格。
- 打印输入文本的左对齐副本。
- 将输入文本的左对齐副本存储在字符数组中。在一个字符串中。在向量中。
- 其他。
What do you mean by "align it to the left"?
- Remove leading whitespace.
- Print out a left-aligned copy of the input text.
- Store a left-aligned copy of the input text in a character array. In a string. In a vector.
- Something else.
喜欢在ms office ..
Like at ms office..
并且喜欢这个左标签。
我害怕我不明白。请发布一个示例,显示输入文本和生成的左对齐输出文本。
I''m afraid I don''t understand. Please post an example showing both the input text and the resultant left-aligned output text.
这篇关于如何将输入文本对齐到左侧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文