Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String transformIWantToStatement( String statement )
- {
- if ( statement.indexOf( "I want to" ) >= 0 )
- statement = statement.substring( statement.indexOf( "I want to" ) + 9 );
- else
- statement = statement.substring( statement.indexOf( "I need to" ) + 9 );
- statement = "What would it mean to you to" + statement;
- statement = switchPronouns( statement );
- statement = stripFinalPunctuation( statement);
- return statement + "?";
- }
- public static String transformIWantStatement( String statement )
- {
- if ( statement.indexOf( "I want" ) >= 0 )
- statement = statement.substring( statement.indexOf( "I want" ) + 6 );
- else
- statement = statement.substring( statement.indexOf( "I need" ) + 6 );
- statement = "Would you really be happy if you had" + statement;
- statement = switchPronouns( statement );
- statement = stripFinalPunctuation( statement);
- return statement + "?";
- }
- part 2
- public static String transformYouMeStatement( String statement )
- {
- statement = statement.toLowerCase();
- statement = statement.substring(indexOfKeyword( statement, "you" ));
- statement = statement.substring( indexOfKeyword( statement, "you" ) + 3 , indexOfKeyword ( statement, "me" ) );
- return "What makes you think that I" + statement + "you?";
- }
- public static String transformIYouStatement( String statement )
- {
- statement = statement.toLowerCase();
- statement = statement.substring(indexOfKeyword( statement, "I" ));
- statement = statement.substring( indexOfKeyword( statement, "I" ) + 1 , indexOfKeyword ( statement, "you" ) );
- return "Why do you" + statement + "me?";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement