Skip to content

作业:文本块居中#1

Open
bigbenfather wants to merge 3 commits intoXueleiFan:mainfrom
bigbenfather:main
Open

作业:文本块居中#1
bigbenfather wants to merge 3 commits intoXueleiFan:mainfrom
bigbenfather:main

Conversation

@bigbenfather
Copy link
Copy Markdown

Island.java演示了文本块居中方法,
TableIsland.java演示了将前导空格换成table。

@leizhnxp
Copy link
Copy Markdown

话说哥们儿你加个\s的意图是个啥木有get到这个点

Comment on lines +1 to +3
/*
* Copyright (c) 2021, Xuelei Fan. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个Copyright可以改成你自己的名字了。

Comment on lines +11 to +15
\s No man is an island,
\s Entire of itself,
\sEvery man is a piece of the continent,
\s A part of the main.
""");
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么有个"\s"的前缀呢? 有没有试试去掉行不行?

Comment on lines +10 to +15
System.out.println("""
\s No man is an island,
\s Entire of itself,
\sEvery man is a piece of the continent,
\s A part of the main.
""");
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

测试Tab是一个很棒的想法。同样的问题,“\s”是必须要加的吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants