標準入力の読み込みと空白除去

This commit is contained in:
s-sakiyama
2026-09-08 16:02:14 +09:00
parent 4304d74b8e
commit d347cc832c
17 changed files with 77 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
#Tue Sep 08 15:28:11 JST 2026
#Tue Sep 08 15:50:07 JST 2026
host=PC60205537
process-id=1996
process-id=16436
user=USER

View File

@@ -1,4 +1,3 @@
useAnnotationsPrefPage=true
eclipse.preferences.version=1
#workspacejre=true
useAnnotationsPrefPage=true
useQuickDiffPrefPage=true

View File

@@ -158,9 +158,7 @@ content_assist_parameters_background,defaultValueBeforeOverriddenFromCSS=255,255
content_assist_parameters_foreground=238,238,238
content_assist_parameters_foreground,defaultValueBeforeOverriddenFromCSS=0,0,0
content_assist_proposals_background=255,255,255
content_assist_proposals_background,defaultValueBeforeOverriddenFromCSS=255,255,255
content_assist_proposals_foreground=0,0,0
content_assist_proposals_foreground,defaultValueBeforeOverriddenFromCSS=0,0,0
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
fontPropagated=true

View File

@@ -1,4 +1,4 @@
eclipse.preferences.version=1
commentBorder=\#4e8f00 | null | false | false | false | false
commentText=\#4e8f00 | null | false | false | false | false
eclipse.preferences.version=1
tagAttributeValue=\#0080ff | null | false | false | false | false

View File

@@ -1,3 +1,4 @@
eclipse.preferences.version=1
migrated.task.repositories.secure.store=true
org.eclipse.mylyn.tasks.ui.filters.nonmatching=true
org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true

View File

@@ -5,7 +5,7 @@ SHOW_LOCATION=true
SWITCH_PERSPECTIVE_ON_PROJECT_CREATION=never
WORKSPACE_NAME=
eclipse.preferences.version=1
platformState=1465734405158
org.eclipse.ui.internal.views.markers.CachedMarkerBuilderorg.eclipse.ui.views.AllMarkersView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<filterGroups andFilters\="false" markerLimit\="100" markerLimitEnabled\="true">\r\n<filterGroup IMemento.internal.id\="USER1622682146355" enabled\="true" filterLimit\="0" name\="\u9078\u629E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8" scope\="3" workingSet\="Aggregate for window 1622529201435">\r\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="CONTAINS" containsText\="" selectedSeverities\="7"/>\r\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\r\n</filterGroup>\r\n</filterGroups>
platformState=1368073821761829
quickStart=false
tipsAndTricks=true
org.eclipse.ui.internal.views.markers.CachedMarkerBuilderorg.eclipse.ui.views.AllMarkersView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<filterGroups andFilters\="false" markerLimit\="100" markerLimitEnabled\="true">\r\n<filterGroup IMemento.internal.id\="USER1622682146355" enabled\="true" filterLimit\="0" name\="\u9078\u629E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8" scope\="3" workingSet\="Aggregate for window 1622529201435">\r\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="CONTAINS" containsText\="" selectedSeverities\="7"/>\r\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\r\n</filterGroup>\r\n</filterGroups>

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
eclipse.preferences.version=1
commentBorder=\#4e8f00 | null | false | false | false | false
commentText=\#4e8f00 | null | false | false | false | false
eclipse.preferences.version=1
elementNamesToIgnore=router-view
tagAttributeValue=\#0080ff | null | false | false | false | false

View File

@@ -1,6 +1,6 @@
eclipse.preferences.version=1
fontPropagated=true
org.eclipse.jface.textfont=1|\uFF2D\uFF33 \u30B4\u30B7\u30C3\u30AF|9.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|\uFF2D\uFF33 \u30B4\u30B7\u30C3\u30AF;
org.eclipse.jface.textfont=1|Yu Gothic UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Yu Gothic UI;
org.eclipse.wst.jsdt.ui.editor.tab.width=
org.eclipse.wst.jsdt.ui.formatterprofiles.version=11
org.eclipse.wst.jsdt.ui.javadoclocations.migrated=true

View File

@@ -1,2 +1,3 @@
commentText=\#658f30 | null | false | false | false | false
eclipse.preferences.version=1
tagAttributeValue=\#0080ff | null | false | false | false | false

View File

@@ -1,14 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<item key="org.eclipse.jdt.ui.last.selected.create.moduleinfo" value="false"/>
<item key="org.eclipse.jdt.ui.last.selected.jre.kind2" value="2"/>
<item key="org.eclipse.jdt.ui.last.selected.execution.enviroment" value="JavaSE-21"/>
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
<item key="layout" value="1"/>
<item key="group_libraries" value="true"/>
<item key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;1&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;&quot;&gt;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;true&quot;&gt;&#x0A;&lt;userDefinedPatterns&gt;&#x0A;&lt;child pattern=&quot;Servers&quot;/&gt;&#x0A;&lt;child pattern=&quot;RemoteSystemsTempFiles&quot;/&gt;&#x0A;&lt;child pattern=&quot;*.iml&quot;/&gt;&#x0A;&lt;child pattern=&quot;bin&quot;/&gt;&#x0A;&lt;/userDefinedPatterns&gt;&#x0A;&lt;xmlDefinedFilters&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.buildship.ui.packageexplorer.filter.gradle.buildfolder&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.m2e.MavenModuleFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.buildship.ui.packageexplorer.filter.gradle.subProject&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.BinaryProjectFilter1&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.ExternalPluginLibrariesFilter1&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.DeprecatedMembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.decompiler*&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0A;&lt;/customFilters&gt;&#x0A;&lt;/packageExplorer&gt;"/>
<item key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;1&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;Aggregate for window 1788848906658&quot;&gt;&#x0D;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;true&quot;&gt;&#x0D;&#x0A;&lt;userDefinedPatterns&gt;&#x0D;&#x0A;&lt;child pattern=&quot;Servers&quot;/&gt;&#x0D;&#x0A;&lt;child pattern=&quot;RemoteSystemsTempFiles&quot;/&gt;&#x0D;&#x0A;&lt;child pattern=&quot;*.iml&quot;/&gt;&#x0D;&#x0A;&lt;child pattern=&quot;bin&quot;/&gt;&#x0D;&#x0A;&lt;/userDefinedPatterns&gt;&#x0D;&#x0A;&lt;xmlDefinedFilters&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.buildship.ui.packageexplorer.filter.gradle.buildfolder&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.m2e.MavenModuleFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.buildship.ui.packageexplorer.filter.gradle.subProject&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.DeprecatedMembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.decompiler*&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0D;&#x0A;&lt;/customFilters&gt;&#x0D;&#x0A;&lt;/packageExplorer&gt;"/>
<item key="rootMode" value="1"/>
<item key="linkWithEditor" value="false"/>
</section>
<section name="javadoc">
<item key="additionalparam" value="-encoding UTF-8&#x0D;&#x0A;-charset UTF-8"/>
</section>
<section name="JavaProjectWizard.dialogBounds">
<item key="DIALOG_X_ORIGIN" value="140"/>
<item key="DIALOG_Y_ORIGIN" value="-148"/>
<item key="DIALOG_WIDTH" value="744"/>
<item key="DIALOG_HEIGHT" value="799"/>
<item key="DIALOG_FONT_NAME" value="1|Yu Gothic UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Yu Gothic UI"/>
</section>
<section name="JavaElementSearchActions">
</section>
<section name="NewClassCreationWizard.dialogBounds">
<item key="DIALOG_X_ORIGIN" value="180"/>
<item key="DIALOG_Y_ORIGIN" value="-55"/>
<item key="DIALOG_WIDTH" value="664"/>
<item key="DIALOG_HEIGHT" value="659"/>
<item key="DIALOG_FONT_NAME" value="1|Yu Gothic UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Yu Gothic UI"/>
</section>
<section name="OptionalMessageDialog.hide.">
<item key="org.eclipse.jdt.ui.typecomment.deprecated" value="true"/>
</section>
<section name="NewClassWizardPage">
<item key="create_constructor" value="false"/>
<item key="create_unimplemented" value="true"/>
</section>
<section name="completion_proposal_size">
</section>
<section name="quick_assist_proposal_size">
</section>
</section>

View File

@@ -1,3 +1,3 @@
#Tue Sep 08 15:28:11 JST 2026
#Tue Sep 08 15:50:07 JST 2026
org.eclipse.core.runtime=2
org.eclipse.platform=4.37.0.v20250905-0730

View File

@@ -1,8 +1,18 @@
import java.util.Scanner;
public class StringCheck {
public static void main(String[] args) {
String[] defaultMessage ={
"いまなにしてる?","何も入力されていません",
"投稿文が長すぎます","↓↓↓↓↓↓ 投稿されました ↓↓↓↓↓↓"
};
//スキャナーの準備
Scanner scanner = new Scanner(System.in);
// 入力処理を行う
String str = scanner.nextLine().trim();
//スキャナーの解放
scanner.close();
System.out.println(str);
}
}
}