当前位置:网站首页>Unity sends messages and blocks indecent words
Unity sends messages and blocks indecent words
2022-07-05 04:55:00 【yaohuiyaoo】
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Test : MonoBehaviour {
Text text;
Button btn;
InputField inout;
string temp;
void Start () {
temp = null;
text = transform.GetChild(0).GetComponent
btn = transform.GetChild(1).GetComponent();
inout = transform.GetChild(2).GetComponent();
btn.onClick.AddListener(Send);
}
string mm;
void Send()
{
string s =inout.text;
List list = new List();
list.Add(“ Bad guys ”);
list.Add(“ A fool ”);
for(int i = 0; i < list.Count; i++)
{
for (int j = 0; j< s.Length; j++)
{
temp = temp + s[j];
//print(temp);
for (int z =j+1; z < s.Length; z++)
{
temp = temp+s[z];
print(temp);
if (temp.Equals(list[i]))
{
int y = z - j;
mm= s.Replace(temp,Change(y));
break;
}
}
temp = null;
}
}
text.text = mm;
}
private string Change(int y)
{
string s = null;
for (int i = 0; i <=y; i++)
{
s = s + "*";
}
return s;
}
边栏推荐
- Difference between singleton and factory pattern
- [crampon programming] lintcode decoding Encyclopedia - 1100 strange printer
- AutoCAD - stretching
- Research and forecast report on China's solution polymerized styrene butadiene rubber (SSBR) industry (2022 Edition)
- 2020-10-27
- AutoCAD - graphic input and output
- [groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
- mysql审计日志归档
- Variable category (automatic, static, register, external)
- 2021-10-29
猜你喜欢
![[groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)](/img/36/c4206a95c007e41df628d99e06ba18.jpg)
[groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)

54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●

次小生成树

质量体系建设之路的分分合合

Unity3d learning notes

stm32Cubemx(8):RTC和RTC唤醒中断

Download the details and sequence of the original data access from the ENA database in EBI

669. 修剪二叉搜索树 ●●
![[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator](/img/cc/06580ce7b553182968d273841a78b4.jpg)
[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator

2021 higher education social cup mathematical modeling national tournament ABCD questions - problem solving ideas - Mathematical Modeling
随机推荐
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
3dsmax common commands
中国金刚烷行业研究与投资预测报告(2022版)
Solution of circular dependency
JVM 原理和流程简介
The first topic of ape Anthropology
[groovy] closure (closure as function parameter | code example)
质量体系建设之路的分分合合
3dsmax2018 common operations and some shortcut keys of editable polygons
AutoCAD - workspace settings
669. 修剪二叉搜索树 ●●
Out and ref functions of unity
Inline built-in function
C iterator
Reading and visualization of DICOM, MHD and raw files in medical imaging
AutoCAD - continuous annotation
[ideas] 2021 may day mathematical modeling competition / May Day mathematical modeling ideas + references + codes
Debug insights
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
China as resin Market Research and investment forecast report (2022 Edition)